SHARE
TWEET

Untitled

a guest Aug 19th, 2019 130 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top