I paused the script, letting it say 3500 seconds using the time module for ex time.sleep (3500).
Now my goal is to scan keystrokes while the script is in sleep mode, I mean it in this line.
As if I want to restart the script if the "Ctrl + R" key is pressed .
For ex .. consider
import time
print "Hello.. again"
while True:
time.sleep(3500)
Now that the code is on the last line, if I press Ctrl + R, I want to print the line "Hello .. again" again.
source
share