Python Bug:os.spawnvc

Jeff Epler jepler at inetnebr.com
Mon Jul 19 20:30:40 EDT 1999


On 18 Jul 1999 23:33:28 GMT, Anthony Pfrunder
 <s341625 at student.uq.edu.au> wrote:
>Hi,
>
>I think I have found a bug in python but it could be a Windows bug.  With
>os.spawnvc in this form:

It's Windows brain damage.

%0 should be what is the first argument in "args", but Windows overwrites
it with the actual path to the executable (.bat file in this case)

Another spawn* gotcha on Windows when I was writing C for it would be that
	os.spawnvc(P_WAIT, "test.bat", ["test", "a b", "c"], [])
would actually have 3 arguments, "a", "b", and "c".  I don't know if this
dane brammage is worked around in the Python source, but we worked around
it in our program.  The equivalent of
	os.spawnvc(P_WAIT, "test.bat", ["test", "\"a b\"", "c"], [])
works, for some value of work.  (but who knows what other gotchas lie in
wait)

Jeff
-- 
\/ http://www.infidels.org/                      Jeff Epler jepler at inetnebr.com
Fights between cats and dogs are prohibited by statute in Barber, North
Carolina.




More information about the Python-list mailing list