File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 3535from psyplot_gui .plot_creator import PlotCreator
3636from psyplot_gui .help_explorer import HelpExplorer
3737from psyplot_gui .fmt_widget import FormatoptionWidget
38- from psyplot_gui .common import PyErrorMessage , get_icon
38+ from psyplot_gui .common import PyErrorMessage , get_icon , StreamToLogger
3939from psyplot_gui .preferences import (
4040 Prefences , GuiRcParamsWidget , PsyRcParamsWidget )
4141from psyplot_gui .dependencies import DependenciesDialog
@@ -98,6 +98,10 @@ def __init__(self, show=True):
9898 show: bool
9999 If True, the created mainwindow is show
100100 """
101+ if sys .stdout is None :
102+ sys .stdout = StreamToLogger (self .logger )
103+ if sys .stderr is None :
104+ sys .stderr = StreamToLogger (self .logger )
101105 super (MainWindow , self ).__init__ ()
102106 self .setWindowIcon (QIcon (get_icon ('logo.png' )))
103107
You can’t perform that action at this time.
0 commit comments