Depending on what parameters you give to your wxApp or
its derivate, you can make stdout go to the console,
to a separate window, or to a log file. (Strange, I can't
find this in the wxWindows alphabetical class reference.)
Anyway:
myApp = wxApp(0) #=> Print to "DOS prompt"
myApp = wxApp(1) #=> Print to separate stdout/stderr Window
myApp = wxApp(filename='log.txt') #=> Print to file 'log.txt'
wxApp(1) is a bit boring if your app crashes badly, unless
you are a very fast reader...
···
At 10:09 2002-11-22 -0600, you wrote:
The Python code spits out diagnostic info via print statements.
--
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/ mailto:magnus@thinkware.se
This is a great tip. I didn't know that This is a good
candidate for the wiki.
-- Mike
···
On Fri, Nov 22 @ 18:24, Magnus Lycka wrote:
Depending on what parameters you give to your wxApp or
its derivate, you can make stdout go to the console,
to a separate window, or to a log file. (Strange, I can't
find this in the wxWindows alphabetical class reference.)
Anyway:
myApp = wxApp(0) #=> Print to "DOS prompt"
myApp = wxApp(1) #=> Print to separate stdout/stderr Window
myApp = wxApp(filename='log.txt') #=> Print to file 'log.txt'
wxApp(1) is a bit boring if your app crashes badly, unless
you are a very fast reader...
--
Michael Gilfix
mgilfix@eecs.tufts.edu
For my gpg public key:
http://www.eecs.tufts.edu/~mgilfix/contact.html
You can't find it in the Documentation. It's a wxPython feature and not a
wxWindows feature. Actually for logging to a file you have to say
myApp = wxApp(1,filename='log.txt') #=> Print to file 'log.txt'
The parameter '1' regulates if it's redirected or not.
UC
···
On Friday 22 November 2002 09:24 am, Magnus Lycka wrote:
At 10:09 2002-11-22 -0600, you wrote:
>The Python code spits out diagnostic info via print statements.
Depending on what parameters you give to your wxApp or
its derivate, you can make stdout go to the console,
to a separate window, or to a log file. (Strange, I can't
find this in the wxWindows alphabetical class reference.)
Anyway:
myApp = wxApp(0) #=> Print to "DOS prompt"
myApp = wxApp(1) #=> Print to separate stdout/stderr Window
myApp = wxApp(filename='log.txt') #=> Print to file 'log.txt'
wxApp(1) is a bit boring if your app crashes badly, unless
you are a very fast reader...
--
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417