diff options
author | Guido van Rossum <guido@python.org> | 1999-11-02 20:44:07 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-11-02 20:44:07 (GMT) |
commit | dd7cbbf4d320317065d041a7b407fae840563012 (patch) | |
tree | 421740afc61121ad8a35816a1361afaa471dc943 /Lib/os.py | |
parent | 8b4b46e4f3d9d80bfc09961efaf5fc65807e34ab (diff) | |
download | cpython-dd7cbbf4d320317065d041a7b407fae840563012.zip cpython-dd7cbbf4d320317065d041a7b407fae840563012.tar.gz cpython-dd7cbbf4d320317065d041a7b407fae840563012.tar.bz2 |
Oops. spawnl() and spawnle() should be implemented on Windows too.
Also added a comment that the 'p' variants (spawnvp() etc.) are *not*
supported on Windows. (They could be by adding them to posixmodule.c)
Diffstat (limited to 'Lib/os.py')
-rw-r--r-- | Lib/os.py | 21 |
1 files changed, 14 insertions, 7 deletions
@@ -330,7 +330,17 @@ if _exists("fork") and not _exists("spawnv") and _exists("execv"): def spawnve(mode, file, args, env): return _spawnvef(mode, file, args, env, execve) - # Supply the various other variants + # Note: spawnvp[e] is't currently supported on Windows + + def spawnvp(mode, file, args): + return _spawnvef(mode, file, args, None, execvp) + + def spawnvpe(mode, file, args, env): + return _spawnvef(mode, file, args, env, execvpe) + +if _exists("spawnv"): + # These aren't supplied by the basic Windows code + # but can be easily implemented in Python def spawnl(mode, file, *args): return spawnv(mode, file, args) @@ -339,15 +349,12 @@ if _exists("fork") and not _exists("spawnv") and _exists("execv"): env = args[-1] return spawnve(mode, file, args[:-1], env) +if _exists("spawnvp"): + # At the moment, Windows doesn't implement spawnvp[e], + # so it won't have spawnlp[e] either. def spawnlp(mode, file, *args): return spawnvp(mode, file, args) def spawnlpe(mode, file, *args): env = args[-1] return spawnvpe(mode, file, args[:-1], env) - - def spawnvp(mode, file, args): - return _spawnvef(mode, file, args, None, execvp) - - def spawnvpe(mode, file, args, env): - return _spawnvef(mode, file, args, env, execvpe) |