win32+popen4
Robert Amesz
sheershion at mailexpire.com
Fri Mar 1 11:08:00 EST 2002
Robin Becker wrote:
> ....
>>
>>However, if you are on a 9x platform, and quoting the command just
>>as you want the command interpreter to see it on the command line
>>doesn't work, you might just want to revert to using the short
>>(non-space) version of the name. So in your example you would
>>replace "program files" with "progra~1" (or whatever it may be in
>>the unlikely event it's different than that).
>>
>>--
>>-- David
> this is win2k. I have tried quoting with "", but I still seem to
> be getting
>
> no such command C:\program etc
On Win98 I've found I had to quote *and* escape the quote characters,
and - sometimes - backslashes too. I'm not sure if this is also the
case on Win2000, but it's worth a try. This would yield something like:
'\\"c:\\\\program files\\\\dimbo\\\\bongo.exe\\\\" \\"c:\\\\program
files\\\\dumbo\\\\my file.dat\\"'
Horrible, I know. Somewhere in the gizzards of Python there's some
double parsing of the commandline going on. This is doubly insidious on
Win98 as it pipes its data through a little program called
win9xpopen.exe, which chokes when argc isn't exactly 2.
Well, chokes isn't the right word: it pops up a dialog box, but when
called from Python this dialog is invisible... Fun, ain't it? I'm not
going to tell you how long it took me to find out this little quirk. I
hope it's fixed in 2.2. And yes, I did report this behaviour a while
back.
Robert Amesz
More information about the Python-list
mailing list