Created
February 22, 2011 21:37
-
-
Save strycore/839462 to your computer and use it in GitHub Desktop.
unplug life support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import time | |
import os.path | |
while True: | |
if not os.path.exists("/dev/input/js0"): | |
break | |
else: | |
# Do stuff here | |
time.sleep(0.5) | |
print "quitting loop" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment