python - 如何使用 Python 启动应用程序

标签 python

我想使用 Python 脚本启动应用程序,然后单击"file"打开文件。应该如何实现这一点呢?例如,我想编写一个脚本来启动我拥有的自动化工具/程序。

还有其他更适合此的脚本语言吗?

感谢您!

最佳答案

如果我正确理解你的问题,你基本上想使用 python 加载一个程序,如果是这样你应该尝试这样的事情:

import os
ACRORD = r"c:\Program Files\Adobe\Acrobat 5.0\Reader\acrord32.exe"
os.system ('"%s" %s' % (ACRORD, r"c:\temp\blah.pdf"))

也可以在这里找到:http://mail.python.org/pipermail/python-win32/2004-April/001868.html

关于python - 如何使用 Python 启动应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4488847/

相关文章:

python - Python 中 str 的静态方法与实例方法

python - 添加两列,即mean_a 和 mean_b

python - python 中的相对模块路径 - 如何配置路径(和 PyCharm)

python - 为什么我收到 TypeError : unsupported operand types for %: 'NoneType and Int

python - Django - 如何在发布表单时添加用户的 IP 地址

python - 谷歌云存储 api 性能回归

python - 从python脚本获取输出到django

python - xml.etree.ElementTree.ParseError : not well-formed (invalid token) 错误

python - Pandas 有效地重新索引和插入时间序列(重新索引删除数据)

python - 如何阻止 CharField 在新的发布请求后清除其数据?