且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我可以在运行时从脚本打开应用程序吗?

更新时间:2023-10-16 11:31:46

假设您使用的是 Windows,您将使用以下命令之一.

Assuming that you are using Windows you would use one of the following commands like this.

subprocess.call

import subprocess
subprocess.call('C:\\myprogram.exe')

os.startfile

import os
os.startfile('C:\\myprogram.exe')