gui_logging#
Defines the Printer class used to log to file and to the GUI widgets from simple prints
- class Printer(log_path=None, color=None, logger_type='info', app=None, open_mode='a', redirects=None, parent=None)[source]#
Bases:
QWidget
- colourise(msg, force=False)[source]#
Convert msg to the self.color colour in html
- Parameters:
str (msg) – The message to colourise
bool (force) – By default, do not colorise html code (to avoid messing up existing colours). This forces the colorise nonetheless.
Returns
- original_std_err = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>#
- original_std_out = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>#
- text_updated#