[python-win32] Spawning processes with os module

Christian Junker christianjunker at gmail.com
Thu Oct 27 18:58:10 CEST 2005


Hi people,

I am having difficulty spawning processes with the os.P_NOWAIT and the
waitpid function in the os module. What I simply want to do is to
launch another process along with immediately getting its exit status
in a cross-platform supported way. However the exit status is actually
shifted 8 bits left on Win32 and when manually shifting it back, I
always get 1 as the exit status although the process has obviously
been started successfully.

As we do not wish to use extra packages and modules, we need to have
some way to do this very common task *without* win32all package -
which as I know would have functions for properly launching processes
on Windows - and just with the Python Standard library.

Anyone with experiences on this field? I can't believe that there is
no cookbook code snippet for this very commonly found task and that
Python seems to lack crossplatform-power at this point.

--
Best Regards
Christian Junker


More information about the Python-win32 mailing list