Wait for keypress

T

TheOneRedDragon

At the moment, I have a command-line application which prints out
quite a lot of text to the screen.
However, when Windows users run it, the prompt disappears before they
can read any of it.
Is there any simple way to make a script wait for a keypress before
completing?
Thanks for any help.
 
S

Steve Holden

At the moment, I have a command-line application which prints out
quite a lot of text to the screen.
However, when Windows users run it, the prompt disappears before they
can read any of it.
Is there any simple way to make a script wait for a keypress before
completing?
Thanks for any help.
At the end of your program just add:

raw_input("Press Enter to terminate")

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
Blog of Note: http://holdenweb.blogspot.com
See you at PyCon? http://us.pycon.org/TX2007
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top