wb_logging.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:scm-workbench 作者: barry-scott 项目源码 文件源码
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 )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号