Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement