Created
February 6, 2010 14:29
-
-
Save hktechn0/296741 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/env python | |
import threading | |
import time | |
class test(threading.Thread): | |
def __init__(self): | |
threading.Thread.__init__(self) | |
self.setDaemon(True) | |
self.i = 0 | |
def run(self): | |
print "Start." | |
while True: | |
time.sleep(10) | |
self.i += 1 | |
print self.i * 10 | |
if __name__ == "__main__": | |
t = test() | |
t.start() | |
time.sleep(30) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment