【发布时间】:2019-09-08 06:58:13
【问题描述】:
我只想打开应用程序,只说出应用程序的名称,而不是输入/说出路径或位置。我还想打开名称带有空格的应用程序,例如“google chrome”、“snipping tool”等。 这适用于 excel、spotify、cmd、记事本和其他一些程序,但不适用于 word、powerpoint 等。
elif "start" in text:
app_name = text.strip("start ")
app = app_name
os.system(app)
我只是希望它可以与谷歌浏览器等双词应用程序以及 Word、powerpoint 等应用程序一起使用。
【问题讨论】:
标签: python file operating-system