Launch modules as subprocesses in the background, and detach

前端 未结 3 2077
借酒劲吻你
借酒劲吻你 2021-01-25 07:57

In bash, I can do the following:

for f in subdir/*.sh; do
    nohup \"$f\" \"$@\" &> /dev/null &
done

in other words, i

3条回答
  •  面向向阳花
    2021-01-25 08:49

    I don't know about any mechanism for it in python, but you may try to use nohup. You may try to run

    nohup python your_script.py arguments
    

    Using os.system or subprocess.call.

提交回复
热议问题