* 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()
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 @@
# 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 @@
# 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.