Redirecting stdout, stderr back to command prompt

When working on a wxPython program, I frequently make mistakes that cause
the program to crash while the main form is initializing. The traceback is
directed to the wxWindows console-like output window, which appears for a
fraction of a second, then vanishes.

How can I get this information to stick around long enough to read it?

Ideally, I could undo the existing redirection, which would send all
tracebacks and print output to my command window.

This is on WinXP Pro, python 2.2, wxPython 2.4.0

Thanks in advance.

  William Wicker.

William Wicker wrote:

When working on a wxPython program, I frequently make mistakes that cause
the program to crash while the main form is initializing. The traceback is
directed to the wxWindows console-like output window, which appears for a
fraction of a second, then vanishes.

How can I get this information to stick around long enough to read it?

Ideally, I could undo the existing redirection, which would send all
tracebacks and print output to my command window.

This is on WinXP Pro, python 2.2, wxPython 2.4.0

I couldn't find this in the archive, but here's a copy I kept myself from 2003/10/03, hope that helps:

...
When you create your app, pass a zero (0) as the parameter to it.

This tells "don't redirect standard out to a window" then all the
messages will be shown on standard out.

Matthew Sherborne

Jeff Kotula wrote:

···

-------- Original Message --------

>
> I'm running a wxPython app that contains some debugging output. wxPython
> very nicely creates a window to display this text in. However, I
> cannot get the
> application to exit when the main frame is deleted and take that output
> window with it.
>
> Any help rabidly appreciated.
>
> -------------------------------------------------------------------------------------

>
> Jeff Kotula Systems Architecture Manager
> Vital Images jkotula@vitalimages.com
>
> Renunciation is not giving up the things of this world,
> but accepting that they go away.
> -- Suzuki Roshi
>