I want to keep applications that I run using the subprocess library to keep running even after python closes. The following code opens notepad for a short while and then the program closes.
from subprocess import Popen
from time import sleep
Popen('start notepad', shell=True)
sleep(1)
I tried the solutions from the following posts, but none of them work.
Do NOT terminate python subprocess when script ends
Popen waiting for child process even when the immediate child has terminated
os.startfile("notepad")
also doesn't work
I am using Windows 10 and would prefer if no other terminal window opened. How can I achieve this behavior?