如何使用python在Windows 64位中调用32位exe?

时间:2009-12-07 17:28:17

标签: python windows 64-bit 32-bit

我想在64位版本的vista上调用python的exe。我知道使用子进程,但所有32位应用程序都存储在C:\ Program Files(x86)\中,并且它不喜欢我认为的空格。我试过逃脱角色,不开火,有什么想法吗?

1 个答案:

答案 0 :(得分:1)

textEditorExecutablePath = 'C:\\Program Files (x86)\\Notepad2\\Notepad2.exe'
filepathToOpen = 'C:\\file.txt'
subprocess.Popen([textEditorExecutablePath, filepathToOpen])

适合我。你怎么称Popen?