Hi all,
 
I would like to run a program via the os.popen (or similar) commands.  However, the path to the executable that I would like to run contains spaces (e.g. C:\program files\some directory\engine\theexe.exe).  The python syntax that I am using is as follows:
 
>>> os.popen4("C:\program files\some directory\engine\theexe.exe")[1].read()
 
When I try to run it, I get the following message:
"'C:\\program' is not recognized as an internal or external command,\noperable program or batch file.\n"
 
So, the space for "program files" is messing it up.  I thought that I could get around that by using progra~1:
>>> os.popen4("C:\progra~1\some directory\engine\theexe.exe")[1].read()
 
When I try to run it, I get the following message:
"'C:\\progra~1\\some' is not recognized as an internal or external command,\noperable program or batch file.\n
 
This time, it doesn't like the directory named "some directory".  Is there any way around this?  The command runs fine if I open up a Windows command prompt and specify the full directory path to the exe.  I am using python 2.4 on a Windows 2003 server.  I am also running this command on Windows 2003 server. 
 
Thanks,
Steve
_______________________________________________
Python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to