Support Forums

Full Version: Pause .py file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok... I'm trying to make a program that will run a madlibs program. I have the file (with a text saved as .py)made but when I'm done it always closes before I can read the paragraph. Is there a way to pause it to show the last part without closing?
You can import the time module and then use
Code:
import time
print "Start a Pause"
time.sleep(10)
print "After 10 seconds"

wait 10 seconds before going on
How do i import the time module?... I just started learning python today
(10-13-2009, 07:59 PM)zenzul Wrote: [ -> ]How do i import the time module?... I just started learning python today

I've updated the code above.
Oh i figured it out! Thanks!
you can also do something like
Code:
raw_input("Press Enter To Continue")
yea and if you dont want to see the press enter just do
Code:
raw_input("")
(10-20-2009, 10:51 AM)Mr.FeellingLeSS Wrote: [ -> ]yea and if you dont want to see the press enter just do
Code:
raw_input("")

That waorks, but how wil the user know what to do O.o