spaces in filenames

Gordon McMillan gmcm at hypernet.com
Thu Jun 15 14:03:45 EDT 2000


echuck3 at my-deja.com wrote:

>In article <8F545A89Agmcmhypernetcom at 199.171.54.154>,
>  gmcm at hypernet.com (Gordon McMillan) wrote:
>> Paul Prescod wrote:
>>
>> >Try double clicking a PDF document with a space in its path. Adobe
>> >Acrobat 4 will not find it. It's annoying as hell because Internet
>> >Explorer puts files from the Web in the "Temporary Internet Files"
>> >directory.
>>
>> That's the installer's fault, not Acrobat 4's. Just (double)quote the
>%1 in
>> the open action for the file type.
>>
>> I get a big kick out of MS's habitual use of paths with embedded
>spaces.
>> Sort of a barometer of hubris.


>Perhaps they do it on purpose so that programmers will get their act
>together and support pathnames with spaces. As someone already pointed
>out, this has been supported for many years on UNIX and I guess about 5
>on Windows.

>I don't care for Microsoft, but I have to say it's the developers who
>have screwed up this time.

Snort. Try the system() call. If the arg has spaces in it, it has to be 
within double quotes. Fine. But if it *doesn't* have spaces, lovely Windows 
will give you an error if you *do* double quote it. And the error msg is 
completely incomprehensible (of course). [This on NT 4 - other forms of 
Windows may blow different colored chunks.]

>What's wrong with the developers at Adobe that [a] they can't handle a
>space and [b] their pre-release testing didn't find this?

I doubt there's any problem in opening a file with a space in the path. The 
issue is that the file association says:

<some.exe> %1

where it should say:

<some.exe> "%1"

(which it does on my system, but maybe I fixed it; or maybe Paul screwed it 
up ;-)).

- Gordon



More information about the Python-list mailing list