[Python-Dev] Adventures with x64, VS7 and VS8 on Windows

Tony Nelson tonynelson at georgeanelson.com
Tue May 29 18:36:45 CEST 2007

At 1:14 PM +0000 5/29/07, Kristján Valur Jónsson wrote:
>> -----Original Message-----
>> Microsoft's command line cannot cope with two pathnames that must be
>> quoted, so if the command path itself must be quoted, then no argument
>> to
>> the command can be quoted.  There are tricky hacks that can work around
>> this mind-boggling stupidity, but life is simpler if Python itself
>> doesn't
>> use up the one quoted pathname.  I don't know if Microsoft has had the
>> good
>> sense to fix this in Vista (which I probably will never use, since an
>> alternative exists), but they didn't in XP.
>Do you have any references for this claim?
>In my command line on XP sp2, this works just fine:
>C:\Program Files\Microsoft Visual Studio 8\VC>"c:\Program Files\TextPad 4\TextPad.exe" "c:\tmp\f a.txt" "c:\tmp\f b.txt"
>Both the program, and the two file names are quoted and textpad.exe opens
>them both.

I pounded my head against this issue when working on a .bat file a few
years back, until I read the help for cmd and saw the quote logic (and
switched to VBScript).  It's still there, in "help cmd".  I had once found
references to the same issue for the run command in Microsoft's online help.

Perhaps it is fixed in SP2. If so, just change it and don't worry about
users with earlier versions of Windows.
TonyN.:'                       <mailto:tonynelson at georgeanelson.com>
      '                              <http://www.georgeanelson.com/>

More information about the Python-Dev mailing list