a command line option (+config file option when the time comes) that enables to redirect any output to a file.
show logs/errors in a tab of the mainframe
Note that: wx.App(redirect=True, filename=...) already has the capability to do either but not both of these at the same time: filename=None indicates that output should be shown in a separate window. The problem is that a user will never see the log if an error causes the application to exit. Furthermore the default logging window is rather ugly and feels unnatural.
wx.crust.Crust can be used to redirect stdio. Unfortunately, this is a little buggy for asynchronous IO. Also, just like wx.App(redirect=True, ...) it is unable to multiplex IO to a file as well (I think?).
The following posts on stackoverflow suggest interesting solutions to the problem:
I don't think anymore that redirecting stdout/stderr is necessary (the user can do this manually if he wants to). Showing context specific logging output in a tab will be sufficient.
It would be nice to have
Note that:
wx.App(redirect=True, filename=...)
already has the capability to do either but not both of these at the same time:filename=None
indicates that output should be shown in a separate window. The problem is that a user will never see the log if an error causes the application to exit. Furthermore the default logging window is rather ugly and feels unnatural.wx.crust.Crust
can be used to redirect stdio. Unfortunately, this is a little buggy for asynchronous IO. Also, just likewx.App(redirect=True, ...)
it is unable to multiplex IO to a file as well (I think?).The following posts on stackoverflow suggest interesting solutions to the problem:
Further ideas are welcome.