brindly sujith wrote:
> hi
>  
> i m developing a application using tkinter
>  
> i want the messages that we get in the terminal to be displayed in the 
> tkinter dialog box
>  
> do we have any option for that
>  
> thank you
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss@python.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss
>   
maybe you could redirect sys.stdout to tkinter textbox. or make wrapper 
for stdout

or something like this

class Klass():
    def __init__(self):
        self.x = ''
    def write(self, c):
        self.x += c
    def writelines(self, l):
        for i in l:
            self.x += i
w = Wrapper()
 sys.stdout = w

and insert w.x to tkinter text
t.insert(1.1, w.x)
w.x = ''

dont know much about tkinter, but i hope that this help you

_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to