diff options
author | Fred Drake <fdrake@acm.org> | 2000-09-28 19:10:56 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-09-28 19:10:56 (GMT) |
commit | 20af3172ce46a13789dbb4087e1115c95cfa9227 (patch) | |
tree | 3123caa07f76f758aa7010d24ee1119d3b635844 /Lib/os.py | |
parent | d75e63a865b451c24e1a0516744a98d59691b4ff (diff) | |
download | cpython-20af3172ce46a13789dbb4087e1115c95cfa9227.zip cpython-20af3172ce46a13789dbb4087e1115c95cfa9227.tar.gz cpython-20af3172ce46a13789dbb4087e1115c95cfa9227.tar.bz2 |
popen4(): Added for Unix.
Fixed a typo in a docstring.
Diffstat (limited to 'Lib/os.py')
-rw-r--r-- | Lib/os.py | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -317,7 +317,7 @@ else: def getenv(key, default=None): """Get an environment variable, return None if it doesn't exist. - The optional second argument can specify an alternative default.""" + The optional second argument can specify an alternate default.""" return environ.get(key, default) def _exists(name): @@ -458,14 +458,18 @@ otherwise return -SIG, where SIG is the signal that killed it. """ if _exists("fork"): if not _exists("popen2"): def popen2(cmd, mode="t", bufsize=-1): - assert mode[:1] in ("b", "t") import popen2 stdout, stdin = popen2.popen2(cmd, bufsize) return stdin, stdout if not _exists("popen3"): def popen3(cmd, mode="t", bufsize=-1): - assert mode[:1] in ("b", "t") import popen2 stdout, stdin, stderr = popen2.popen3(cmd, bufsize) return stdin, stdout, stderr + + if not _exists("popen4"): + def popen4(cmd, mode="t", bufsize=-1): + import popen2 + stdout, stdin = popen2.popen4(cmd, bufsize) + return stdin, stdout |