Created
May 28, 2014 16:24
-
-
Save possatti/2e0d71607a6dfdee90ed to your computer and use it in GitHub Desktop.
Inicia um programa que fica invocando outras janelas do gnome-terminal que fazem exatamente a mesma coisa. :|
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
from subprocess import call | |
import random | |
random.seed() | |
cyclesCount = 0 | |
cyclesToCreateNewInstance = 9999 | |
sentence = "All work and no play makes Jack a dull boy" | |
def createNewInstance(): | |
call(["gnome-terminal", "-x", "python", "dull-boy.py"]) | |
while True: | |
print sentence | |
cyclesCount += 1 | |
if cyclesCount == cyclesToCreateNewInstance: | |
createNewInstance() # Dangerous line! :) | |
cyclesCount = 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment