Advertisement
Guest User

subprocesses

a guest
Aug 22nd, 2014
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from subprocess import Popen, CREATE_NEW_CONSOLE
  2. import sys
  3.  
  4. if sys.argv[1] == "1":
  5.    command="python script1.py"
  6. else:
  7.    command="python script2.py"
  8.  
  9. Popen(['cmd', '/K', command],creationflags=CREATE_NEW_CONSOLE)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement