process mode flag is taken from these predefined valuesos p_nowait and os p_nowaito the spawn functions will return as soon as the new process has been createdwith the process id as the return value available on unix and windows os p_wait the spawn functions will not return until the new process has run to completion and will return the exit code of the process if the run is successful or "-signalif signal kills the process available on unix and windows os p_detach and os p_overlay p_detach is similar to p_nowaitbut the new process is detached from the console of the calling process if p_overlay is usedthe current program will be replaced (much like os execavailable on windows in factthere are eight different calls in the spawn familywhich all start program but vary slightly in their call signatures in their namesan "lmeans you list arguments individually"pmeans the executable file is looked up on the system pathand "emeans dictionary is passed in to provide the shelled environment of the spawned programthe os spawnve callfor exampleworks the same way as os spawnv but accepts an extra fourth dictionary argument to specify different shell environment for the spawned program (whichby defaultinherits all of the parent' settings)os spawnl(modepathos spawnle(modepathenvos spawnlp(modefileos spawnlpe(modefileenvos spawnv(modepathargsos spawnve(modepathargsenvos spawnvp(modefileargsos spawnvpe(modefileargsenvunix only unix only unix only unix only because these calls mimic the names and call signatures of the os exec variantssee earlier in this for more details on the differences between these call forms unlike the os exec callsonly half of the os spawn forms--those without system path checking (and hence without "pin their names)--are currently implemented on windows all the process mode flags are supported on windowsbut detach and overlay modes are not available on unix because this sort of detail may be prone to changeto verify which are presentbe sure to see the library manual or run dir builtin function call on the os module after an import here is the script in example - at work on windowsspawning independent copies of the child py python program we met earlier in this :\pp \system\processestype child py import ossys print('hello from child'os getpid()sys argv[ ] :\pp \system\processespython spawnv py parallel system tools