def __init__( self, app ):
self.app = app
self.__log_widget = WbLogTextWidget( self.app )
self.__line = ''
# Redirect the console IO to this panel
sys.stdin = wb_platform_specific.getNullDevice().open( 'r' )
if self.app.stdIoRedirected():
sys.stdout = self
sys.stderr = self
sys.excepthook = self.excepthook
# Redirect log to the Log panel
self.widget_log_handler = WidgetLogHandler( self.app, self.__log_widget )
self.app.log.addHandler( self.widget_log_handler )
self.__session_log = open( str(wb_platform_specific.getLogFilename()) + '.session.log', 'w', buffering=1 )
评论列表
文章目录