I want to call a exe from python on a 64bit version of vista. I know to use subprocess, but all the 32bit apps are store in C:\Program Files (x86)\, and it doesn't like the spaces I believe. i have tried escape characters, doesn't fire, any ideas?
+1
A:
textEditorExecutablePath = 'C:\\Program Files (x86)\\Notepad2\\Notepad2.exe'
filepathToOpen = 'C:\\file.txt'
subprocess.Popen([textEditorExecutablePath, filepathToOpen])
Works for me. How are you calling Popen?
Jesse
2009-12-07 17:38:05
Thanks, I was actually trying to pass the args as text, not storing them in a variable
Kevin
2009-12-07 19:03:11