wxPython log/print question

E

Edward K. Ream

Creating a wxApp object in wxPython causes all calls to print go to a fake
console window. This is most inconvenient if errors during startup causes
the fake window to go away. How can I disable this "feature" so that
Python's print statement continues to send its output to the xp console?

Thanks,

Edward
 
D

Dave Brueck

Creating a wxApp object in wxPython causes all calls to print go to a fake
console window. This is most inconvenient if errors during startup causes
the fake window to go away. How can I disable this "feature" so that
Python's print statement continues to send its output to the xp console?

Yeah, I remember that. Short-term: start with "python -i" so that the
interpreter stays running and the messages don't go away. There *is* a way to
disable this - I don't remember exactly where but do remember it wasn't too
painful to find - check the source for the wxApp class (in wx.py I think).

Try wxApp(None).

-Dave
 
E

Edward K. Ream

Try wxApp(None).

Yes. This works. Thanks so much. And I'll remember to consult the source
next time...

Edward
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,166
Messages
2,570,902
Members
47,443
Latest member
RobertHaddy

Latest Threads

Top