Hi
Im looking for a time delay code so my script runs to certain line waits for the time specified then continues.Ive found some but they seem to long and complicated. any ideas or links, books ect...

Many Thanks

HlA91

STAY COOL AND DONT GET STRESSED!:cool:

Function sleep(seconds) from module time is pretty much the best. Remember seconds is a float so you can delay 0.5 seconds.

import time

print "Hello ..."
time.sleep(2.5)  # wait 2.5 seconds
print "... there!"
Member Avatar for Mouche

sorry, posted late. ;)

If you import the time module, you can use the sleep function.

time.sleep(seconds)

ex: time.sleep(5) waits five seconds

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.