[Tutor] Well...

Thomi Richards thomi@thomi.imail.net.nz
Fri Dec 20 05:24:02 2002


> 
> -Could someone explain why GUI toolkits such as Tkinter are needed and
> used?
> 

because, sooner or later, you are going to want to make a program which
does something more then what is possable in a standard text box. or are
you asking about why use TKinter, as opposed to programming the GUI
yourself?

> -Why is it that when a program finishes up, it immediately quits? Some
> 
> programs have outcomes I'd like to view...How can I make it pause
> (like in DOS)?
> 

there are several ways to do this. to make a program pause for a number
of seconds, you can do this:

import time
time.sleep(5)

obviously, the import line goes at the start of your program, and the
time.sleep line goes at the end. in fact, it should be the last command
which is called.

or, you can do this, which asks the user to hit enter:

raw_input('Hit Enter to Exit Program')

try it !



-- 
DOS: n., A small annoying boot virus that causes random spontaneous
system
     crashes, usually just before saving a massive project.  Easily
cured by
     UNIX.  See also MS-DOS, IBM-DOS, DR-DOS.
(from David Vicker's .plan)
Thomi Richards,
thomi@imail.net.nz