Created
March 23, 2017 12:12
-
-
Save addisaden/fb961390b7896dad136aeb2ceb8ad726 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
import sys | |
import time | |
while True: | |
if len(sys.argv) >= 2: | |
print(sys.argv[1]) | |
else: | |
print("no text") | |
time.sleep(1) |
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 subprocess | |
import time | |
a = subprocess.Popen(['python', 'runner.py', 'Prozess A']) | |
b = subprocess.Popen(['python', 'runner.py', 'Prozess B']) | |
time.sleep(10) | |
a.kill() | |
b.kill() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment