"Kent Johnson" <[EMAIL PROTECTED]> wrote
>>> If you literally want print statements to appear in a dialog then 
>>> no,
>>> you can't do that (so far as I know!). But if you want the Tkinter
>>
>> Alan??? Redirect standard output. It doesn't have to be a file 
>> object. It
>> can be any object with a write method.
>
> Another way to do this, if you have control over the print 
> statements,
> is to use the logging package for output. It's not hard to make a 
> log
> handler that captures the messages and outputs them to a GUI panel.

Both of these suggestions are what I had in mind when I said
"create your own logging dialog with a text widget".

I don't know of any way to turn vanilla print statements into GUI 
visible
strings. Even redirecting stdout would require the creation of some 
kind
of custom widget that wrote to the GUI. (But I'd love to be wrong! :-)

Alan G. 


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to