Source code for pyfileconfgui.dash_ext.tb

import traceback

from pyfileconfgui.dash_ext.python import PythonBlockComponent

DEFAULT_HEIGHT = '300px'


[docs]class TracebackComponent(PythonBlockComponent):
[docs] def __init__(self, id: str, **kwargs): if 'style' not in kwargs: kwargs['style'] = {'max-height': DEFAULT_HEIGHT} elif 'max-height' not in kwargs['style']: kwargs['style']['max-height'] = DEFAULT_HEIGHT content = traceback.format_exc() super().__init__(id, content, **kwargs)
[docs] def refresh(self): self.content = traceback.format_exc()