Created
December 1, 2011 15:05
-
-
Save esehara/1417413 to your computer and use it in GitHub Desktop.
栗まんじゅう
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
import threading | |
import time | |
def kuriman(): | |
kuriman = 1 | |
while 1: | |
kuriman = kuriman * 2 if kuriman > 1 else 2 | |
yield kuriman | |
def byby(): | |
manju = kuriman() | |
while 1: | |
print "()" * manju.next(), | |
time.sleep(30) | |
def main(): | |
t = threading.Thread(target = byby) | |
t.setDaemon(True) | |
t.start() | |
while 1:pass | |
if __name__ == "__main__":main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment