os.popen3 with windows; help?
Michele Petrazzo
michele.petrazzo at TOGLIunipex.it
Wed Oct 27 04:55:53 EDT 2004
Russell E. Owen wrote:
> So I tried being specific:
> os.popen3("C:\\Program Files\\ds9\\ds9")
> This also fails and the program that is not found is "C:\Program",
> suggesting that the space in "Program Files" is causing the problem. The
> following failed in exactly the same way:
> os.popen3("C:\\Program\ Files\\ds9\\ds9")
>
> Any suggestions?
>
The problem is that there are spaces into the path. Try to user
os.popen3('"C:\\Program\ Files\\ds9\\ds9"').
The better choice is:
path_complete = os.path.join('c:\\', 'Program Files', 'ds', 'ds9')
os.popen3('"'+ path_complete +'"' )
It work for me.
Michele
More information about the Python-list
mailing list