Created
March 16, 2012 14:11
-
-
Save slashmili/2050211 to your computer and use it in GitHub Desktop.
Milad's Dream
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
import dream | |
import time | |
import threading | |
class Milad ( threading.Thread ): | |
def run ( self ): | |
try : | |
#don't fear ! if you want wake up just want | |
#after that time.Wakeup exception will be happen | |
time.sleep(dream.ONE_YEAR) | |
except dream.StartStory story: | |
f=open("~/dreams.txt") | |
f.write("%s\n"%(story)) | |
f.close() | |
self.run() | |
except time.Wakeup : | |
pass | |
Milad().start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment