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 35
35
from psyplot_gui .plot_creator import PlotCreator
36
36
from psyplot_gui .help_explorer import HelpExplorer
37
37
from 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
39
39
from psyplot_gui .preferences import (
40
40
Prefences , GuiRcParamsWidget , PsyRcParamsWidget )
41
41
from psyplot_gui .dependencies import DependenciesDialog
@@ -98,6 +98,10 @@ def __init__(self, show=True):
98
98
show: bool
99
99
If True, the created mainwindow is show
100
100
"""
101
+ if sys .stdout is None :
102
+ sys .stdout = StreamToLogger (self .logger )
103
+ if sys .stderr is None :
104
+ sys .stderr = StreamToLogger (self .logger )
101
105
super (MainWindow , self ).__init__ ()
102
106
self .setWindowIcon (QIcon (get_icon ('logo.png' )))
103
107
You can’t perform that action at this time.
0 commit comments