open file with whitespaces

mardif mariano.difelice at gmail.com
Fri May 19 10:28:47 EDT 2006


Hi guys.
I've a very big big big problem:

I've in my windows computer a file named cicciobello.html, located in
c:\documents and settings\username\desktop\cicciobello.html.

Now, I MUST open this file with os.spawn(os.P_WAIT ...., because I must
wait the user cancel the explorer window, ok?
And so, I write:

import os
os.spawnl(os.P_WAIT, "c:\programmi\internet explorer\iexplorer.exe",
"c:\documents and settings\username\desktop\cicciobello.html")

the python process don't fail, but explorer don't visualize correctly
the file opened: i receive an "not found" error message.

I've found that the whitespaces in file path are the problem.
If you see to explorer address bar, you will find the address
completely wrong...

I've found no solution!
Can you help me, please??

thx very very very much!!!




More information about the Python-list mailing list