catalight.catalight_GUI.EmittingStream

class catalight.catalight_GUI.EmittingStream(textedit)

Bases: object

Capture console print statements and broadcast within the GUI.

Redefine sys.stdout, which typically handles all print statements. We rewrite the write method to also write to a given Qtextedit.

Parameters:

textedit (QLineEdit) – This should be a line edit box you want to populate w/ print statement.

__init__(textedit)

Methods

__init__(textedit)

flush()

Force print to terminal without buffering

write(text)

Send captured text to sys.stdout and textedit.

flush()

Force print to terminal without buffering

write(text)

Send captured text to sys.stdout and textedit.