Answers for "python execute shell command without waiting"

0

python execute shell command without waiting

import subprocess
from subprocess import Popen
import time
from multiprocessing import Process,freeze_support

def run_batfile(name='world'):
	subprocess.call(["launch_pg.bat"])

if __name__ == '__main__':
	# freeze_support()
	p = Process(target=run_batfile)
	p.start()
	# p.join()	
	count = 0
	while True:
		count+=1
		print(count)
		time.sleep(1)
Posted by: Guest on December-02-2020

Code answers related to "python execute shell command without waiting"

Browse Popular Code Answers by Language