mayank
mayank

Reputation: 223

Waiting for some time before executing the next segment of codes in python3.2

I am writing a code to run a gui application(winmerge) and then send some keystrokes to it. I need to wait for some time within the program till the GUI finishes running and then send some keystrokes to it to save the report. How do I implement this? wait() isn't working as after invoking it I can't send keys to the same window.

Upvotes: 8

Views: 10246

Answers (1)

Mizipzor
Mizipzor

Reputation: 52381

from time import sleep
print "hi,"
sleep(5)
print "this is printed 5 seconds later"

Upvotes: 17

Related Questions