diff options
author | Guido van Rossum <guido@python.org> | 1993-11-08 15:05:21 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1993-11-08 15:05:21 (GMT) |
commit | e65cce5eec23812d77a54095209c923937cc3c92 (patch) | |
tree | ed0b87870ad9c6278e43acf63685b8823cce018c /Lib/commands.py | |
parent | db65a6ce556b1e311d03837fbf85ca52ef2c5d07 (diff) | |
download | cpython-e65cce5eec23812d77a54095209c923937cc3c92.zip cpython-e65cce5eec23812d77a54095209c923937cc3c92.tar.gz cpython-e65cce5eec23812d77a54095209c923937cc3c92.tar.bz2 |
* string.py: added rindex(), rfind(); changed index() to interpret
negative start indices starting from the right.
* ftplib.py: debug() -> set_debuglevel(); change demo to use __init__().
* os.py: added execl, execlp, and execvp.
* lambda.py: removed (now that we have built-in map, reduce, bagof, lambda)
* test_b{1,2}.py, testall.out: added tests for bagof, lambda, map, reduce
* commands.py: use os, not posix
* test_grammar.py: make it easy to disable non-portable int overflow tests
* dis.py: don't abuse range()
Diffstat (limited to 'Lib/commands.py')
-rw-r--r-- | Lib/commands.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/commands.py b/Lib/commands.py index d8c6e65..428a830 100644 --- a/Lib/commands.py +++ b/Lib/commands.py @@ -23,8 +23,8 @@ def getoutput(cmd): # Returns a pair (sts, output) # def getstatusoutput(cmd): - import posix - pipe = posix.popen('{ ' + cmd + '; } 2>&1', 'r') + import os + pipe = os.popen('{ ' + cmd + '; } 2>&1', 'r') text = pipe.read() sts = pipe.close() if sts == None: sts = 0 @@ -35,8 +35,8 @@ def getstatusoutput(cmd): # Make command argument from directory and pathname (prefix space, add quotes). # def mk2arg(head, x): - import posixpath - return mkarg(posixpath.join(head, x)) + import os + return mkarg(os.path.join(head, x)) # Make a shell command argument from a string. |