[Tutor] how to display terminal messages in dialog window usingtkinter

Alan Gauld alan.gauld at btinternet.com
Thu Feb 21 23:14:08 CET 2008


"brindly sujith" <brindly at gmail.com> wrote

> 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

It depends what you mean.

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
equivalent of a print statement you can either create your own
logging dialog with a text widget and write to that or just use
one of the standard dialogs such as

import tkMessageBox
tkMessageBox.showinfo("Window Text", "A short message") At this point 
I'd normally suggest visiting the GUI topic of my tutorial but sadly 
the ISP server is still dead :-(I hope that answers your question?--  
Alan GauldAuthor of the Learn to Program web 
sitehttp://www.freenetpages.co.uk/hp/alan.gauld 




More information about the Tutor mailing list