Launch a completely independent process
问题 I want to initiate a process from my python script main.py . Specifically, I want to run the below command: `nohup python ./myfile.py &` and the file myfile.py should continue running, even after the main.py script exits. I also wish to get the pid of the new process. I tried: os.spawnl* os.exec* subprocess.Popen and all are terminating the myfile.py when the main.py script exits. Update: Can I use os.startfile with xdg-open ? Is it the right approach? Example a = subprocess.Popen([sys