I want to run a shell script in background with the subprocess. However, I don't want to wait for it to complete. I want it to run in background and terminate after it finishes. For simplicity, I am using the sleep command as my script. But as soon as I run, it terminates. If I put the communicate or wait method, then it keeps running but this is not what I want.
def run():
subprocess.Popen(["sleep", "25s"])