I have a Windows, Python 2.7 application that needs to:
- change directory,
- open an application in that directory (using fork or something similar, which disowns the process), then
- exit the script (WITHOUT killing the subprocess).
Any ideas? My attempt below did not work... It just kills notepad!
import os, subprocess
os.chdir('C:/')
p = subprocess.Popen("notepad.exe", close_fds = True, creationflags = 0x00000008 | subprocess.CREATE_NEW_PROCESS_GROUP)
P.s. Yes, I'm aware Python 2.7 is no longer supported. Unfortunately, some commercial applications have been stranded on that platform with compiled code, and we're stuck with it...