[Python-Dev] Why spawnvp not implemented on Windows?

Alexey Borzenkov snaury at gmail.com
Thu Oct 12 17:15:07 CEST 2006

Hi all,

I've been looking at python 2.5 today and what I notices is absense of
spawnvp with this comment in os.py:

  # At the moment, Windows doesn't implement spawnvp[e],
  # so it won't have spawnlp[e] either.

I'm wondering, why so? Searching MSDN I can see that these functions
are implemented in CRT:

  spawnvp: http://msdn2.microsoft.com/en-us/library/275khfab.aspx
  spawnvpe: http://msdn2.microsoft.com/en-us/library/h565xwht.aspx

I can also see that spawnvp and spawnvpe are currently wrapped in
posixmodule.c, but for some reason on OS/2 only. Forgive me if I'm
wrong but shouldn't it work when

  #if defined(PYOS_OS2)

is changed to

  #if defined(PYOS_OS2) || defined(MS_WINDOWS)

around spawnvp and spawnvpe wrappers and in posix_methods?
At least when I did it with my copy, nt.spawnvp seems to work fine...

More information about the Python-Dev mailing list