【问题标题】:How would I call 32bit exes in Windows 64bit with python?我如何使用 python 在 Windows 64 位中调用 32 位 exe?
【发布时间】:2023-03-13 20:49:02
【问题描述】:

我想在 64 位版本的 vista 上从 python 调用 exe。我知道要使用子进程,但所有 32 位应用程序都存储在 C:\Program Files (x86)\ 中,它不喜欢我相信的空间。我试过转义字符,不火,有什么想法吗?

【问题讨论】:

  • 如果这是“路径中的空格”问题,则 64 位/32 位具有误导性...
  • 显示您尝试失败的示例代码,以及它给出的错误消息。
  • “程序文件”中也有空格...

标签: python windows 64-bit 32-bit


【解决方案1】:
textEditorExecutablePath = 'C:\\Program Files (x86)\\Notepad2\\Notepad2.exe'
filepathToOpen = 'C:\\file.txt'
subprocess.Popen([textEditorExecutablePath, filepathToOpen])

为我工作。你怎么称呼 Popen?

【讨论】:

  • 谢谢,我实际上是在尝试将 args 作为文本传递,而不是将它们存储在变量中
猜你喜欢
  • 2012-07-23
  • 2014-12-16
  • 1970-01-01
  • 2013-10-17
  • 2013-06-11
  • 2021-10-18
  • 1970-01-01
  • 2011-06-29
  • 2016-01-29
相关资源
最近更新 更多