[Tutor] help?
Tim Wilson
wilson@isis.visi.com
Sun, 3 Feb 2002 14:32:13 -0600 (CST)
On Sun, 3 Feb 2002, Callum Golding wrote:
> I'm sorry to bother you, but i was wondering if you could give me a little advice. I've recently downloaded Python 2.2. Ive read a begginers guide to programming and tried creating a small program, I used the input function. Now as soon as I open the program it goes into dos and asks me the question, and when i type in an anwser, dos shuts down. Now its really starting to bug me. If you could give me some advice I would be real grateful. The program I wrote is below; -
It's no bother. The problem is that the DOS window is closing
immediately upon your program exiting. Annoying, isn't it. :-)
One way to "fix" this is to add an input line at the end of your program
like this:
end = raw_input("Press a key to end...")
This will leave the window open until you press a key.
-Tim
--
Tim Wilson | Visit Sibley online: | Check out:
Henry Sibley HS | http://www.isd197.org | http://www.zope.com
W. St. Paul, MN | | http://slashdot.org
wilson@visi.com | <dtml-var pithy_quote> | http://linux.com