Spaces:
Runtime error
Runtime error
class MarkdownLogger: | |
def __init__(self): | |
self._log = '' | |
def log_text(self, text): | |
self._log += '\n' + text + '\n' | |
def log_code(self, code): | |
self._log += f'\n```python\n{code}\n```\n' | |
def clear(self): | |
self._log = '' | |
def get_log(self): | |
return self._log |