When embedding with no natural console...?

James C. Ahlstrom jim at interet.com
Wed Feb 21 08:23:09 EST 2001

"Owen F. Ransen" wrote:
> When embedding with no natural console (I mean that
> the application does not have a console output, it
> is pure GUI) what suggestions are there for printing?

You need to replace sys.stdout and sys.stderr with an object which
has a "write" method.  Then you need to make "write" do something.
My "write" saves the text, and displays it in a MessageBox when
the system is idle.  But you could write it to a different window
for example.

Remember that output is lost if something goes wrong before you
can replace sys.stdout/err.


More information about the Python-list mailing list