Alan Gauld wrote: > 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! :-)
OK I'll bite. You don't need a custom GUI widget, you just need a simple adapter. Here is a simple proof of concept that redirects sys.stdout to a Text widget: import sys from Tkinter import * root = Tk() t1 = Text(root) t1.pack() class PrintToT1(object): def write(self, s): t1.insert(END, s) sys.stdout = PrintToT1() print 'Hello, world!' print "Isn't this fun!" mainloop() # Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor