Advertisement
here2share

# run_executable.py

May 17th, 2015
453
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. # run_executable.py
  2.  
  3. import subprocess
  4. import sys
  5.  
  6. path = 'c:\\Windows\\system32\\'
  7. # start program
  8. file = 'calc.exe'
  9. process = subprocess.Popen(path+file, stdout=subprocess.PIPE, creationflags=0x08000000)
  10. process.wait()
  11.  
  12. ### subprocess.call([path+file.encode(sys.getfilesystemencoding())])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement