<div>Hi all,</div>
<div> </div>
<div>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:
</div>
<div> </div>
<div>>>> os.popen4("C:\program files\some directory\engine\theexe.exe")[1].read()</div>
<div> </div>
<div>When I try to run it, I get the following message:<br>"'C:\\program' is not recognized as an internal or external command,\noperable program or batch file.\n"</div>
<div> </div>
<div>So, the space for "program files" is messing it up. I thought that I could get around that by using progra~1:</div>
<div>>>> os.popen4("C:\progra~1\some directory\engine\theexe.exe")[1].read()</div>
<div> </div>
<div>When I try to run it, I get the following message:<br>"'C:\\progra~1\\some' is not recognized as an internal or external command,\noperable program or batch file.\n</div>
<div> </div>
<div>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. </div>
<div> </div>
<div>Thanks,</div>
<div>Steve</div>