1) wx.App 类的实例的时候,注意 redirect参数 和 filename参数的设定。官方文档解释如下:
Parameters:
redirect - Should sys.stdout and sys.stderr be redirected? Defaults to True on Windows and Mac, False otherwise. If filename is None then output will be redirected to a window that pops up as needed. (You can control what kind of window is created for the output by resetting the class variable outputWindowClass to a class of your choosing.)
filename - The name of a file to redirect output to, if redirect is True.