catching errors in embedded Python on Windows

Howard Lightstone howard at eegsoftware.com
Thu Aug 23 19:33:34 EDT 2001


OK, I made up a Python class/methods to take over stderr/stdout when
running Pythonw applications and display them in a Tkinter window.
Works slick.

However, this DOESN'T work when embedding Python since pythonrun.c still
refers to stdout/stderr directly...which Windows doesn't have set to
anything useful.

How does one reroute/catch these errors?  Unfortunately, the only thing
I can think of  involves changing pythonrun.c to use the 'objects'
attached to sys.stdout and sys.stderr so they COULD be rerouted.

It seems to me someone on this list commented on catching these embedded
errors but I can't seem to find it.

Any help?

Thanks




More information about the Python-list mailing list