wxpython下输出错误到控制台console,wxpythonconsole,import sysST


import sysSTDERR = sys.stderr  # Keep stderr because wxPyhon will redirect it.import wx[...your wxPython program goes here...]if __name__ == "__main__":    import traceback,sys    try:        app = MyWxApplication()  # Start you wxPython application here.        app.MainLoop()    except:        traceback.print_exc(file=STDERR)

评论关闭