简体   繁体   English

关闭脚本后如何保持启动的程序打开

[英]how do i keep a started program open after closing the script

I'm in my script using the os.startfile("program_path") command and it opens the program without any problem in visual studio.我在我的脚本中使用os.startfile("program_path")命令,它在 Visual Studio 中打开程序没有任何问题。

However as soon as I close visual studio, the program I started also closes.但是,一旦我关闭了 Visual Studio,我启动的程序也会关闭。

Is there a way to keep the program running even though I've closed visual studio?即使我关闭了 Visual Studio,有没有办法让程序继续运行?

如果您安装了 python 2 和 python 3,您可以使用python <filename.py>python3 <filename.py在 cmd(或终端,如果您在 linux 上)而不是 Visual Studio 中启动脚本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM