How to popup window with text using python?

Grant Edwards ge at nowhere.none
Fri Aug 4 14:24:45 EDT 2000


In article <398ADBFE.43793366 at esec.com.au>, Q wrote:

>Which UI toolkit do I need to have?

Dunno.  There are at least 6 (that I can think of) from which
to choose.

Windows? Mac? Unix?  Text-mode?  GUI?

Tk (which runs on both Windows and Unix) is probably the most
ubiquitous GUI toolkit used by Python programmers:

----------------------------------------------------------------------
#!/usr/bin/python

from Tkinter import *
from SimpleDialog import SimpleDialog

# initialize GUI toolkit

root = Tk()

# pop up a dialog window with some text

SimpleDialog(root,
             text="Hi there\nHere is some text",
             buttons=["OK"],
             default=0,
             title="Demo Dialog").go()

# notice the go()

-- 
Grant Edwards                   grante             Yow!  I have a TINY BOWL in
                                  at               my HEAD
                               visi.com            



More information about the Python-list mailing list