Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from concurrent.futures import ThreadPoolExecutor
- import subprocess
- def run_process(x):
- program = "C:\\Windows\\notepad.exe"
- p = subprocess.Popen([program])
- p.communicate()
- print(p.pid)
- executor = ThreadPoolExecutor(max_workers=4)
- a = executor.submit(run_process)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement