Pause a script before termination

N

noydb

Hi All,

I want to pause my script before it terminates, just so a user can
have a moment to read some print statements I include at the end. How
can this be accomplished?

Thanks!
 
N

noydb

Hi All,

I want to pause my script before it terminates, just so a user can
have a moment to read some print statements I include at the end.  How
can this be accomplished?

Thanks!

Never mind, duh, found my answer now

import time
time.sleep(10) #10 second pause
 
P

Philip Semanchuk

Never mind, duh, found my answer now

import time
time.sleep(10) #10 second pause

Good for you for tracking that down.

However, might I suggest that you replace that with a message like
"Press <Enter> to clear this message and end the program"?
 
G

Gary Herron

noydb said:
Hi All,

I want to pause my script before it terminates, just so a user can
have a moment to read some print statements I include at the end. How
can this be accomplished?

Thanks!
If your IO is to/from a command line window, try this:

raw_input('Hit ENTER to exit: ')

Gary Herron
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top