Guest User

Untitled

a guest
Aug 19th, 2019
137
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from concurrent.futures import ThreadPoolExecutor
  2. import subprocess
  3.  
  4. def run_process(x):
  5. program = "C:\\Windows\\notepad.exe"
  6.  
  7. p = subprocess.Popen([program])
  8. p.communicate()
  9. print(p.pid)
  10.  
  11. executor = ThreadPoolExecutor(max_workers=4)
  12. a = executor.submit(run_process)
RAW Paste Data