Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def doubleDebug():
- import subprocess
- cmd = 'WMIC PROCESS get Caption,Commandline,Processid'
- proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
- numofexecutions=0
- for line in proc.stdout:
- if line[:10] == b'python.exe':
- numofexecutions+=1
- if numofexecutions <= 2:
- os.system(r"C:Python34python.exe C:UsersAlexREMOTEPythonProjectsmain.py")
- return numofexecutions
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement