Wait for keypress

Steve Holden steve at holdenweb.com
Sat Feb 10 06:50:52 EST 2007


TheOneRedDragon at gmail.com wrote:
> 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




More information about the Python-list mailing list