Advertisement
Guest User

Untitled

a guest
Sep 4th, 2015
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. def doubleDebug():
  2. import subprocess
  3. cmd = 'WMIC PROCESS get Caption,Commandline,Processid'
  4. proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
  5. numofexecutions=0
  6. for line in proc.stdout:
  7. if line[:10] == b'python.exe':
  8. numofexecutions+=1
  9. if numofexecutions <= 2:
  10. os.system(r"C:Python34python.exe C:UsersAlexREMOTEPythonProjectsmain.py")
  11. return numofexecutions
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement