diff options
author | Peter Astrand <astrand@lysator.liu.se> | 2004-12-05 20:15:36 (GMT) |
---|---|---|
committer | Peter Astrand <astrand@lysator.liu.se> | 2004-12-05 20:15:36 (GMT) |
commit | 5f5e141589523c3ddf8bbd611f358950126977ef (patch) | |
tree | 50acd56ec0dd3dbaaabed11a39722b9b300de9f9 | |
parent | c7979f16ecc0568e931edf440b25c437b461fd01 (diff) | |
download | cpython-5f5e141589523c3ddf8bbd611f358950126977ef.zip cpython-5f5e141589523c3ddf8bbd611f358950126977ef.tar.gz cpython-5f5e141589523c3ddf8bbd611f358950126977ef.tar.bz2 |
Changed signature of call function to avoid confusion: this 'args' is not the same as the one to the Popen constructor
-rw-r--r-- | Doc/lib/libsubprocess.tex | 2 | ||||
-rw-r--r-- | Lib/subprocess.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Doc/lib/libsubprocess.tex b/Doc/lib/libsubprocess.tex index 77bd83e..308c1dd 100644 --- a/Doc/lib/libsubprocess.tex +++ b/Doc/lib/libsubprocess.tex @@ -122,7 +122,7 @@ process. (Windows only) This module also defines one shortcut function: -\begin{funcdesc}{call}{*args, **kwargs} +\begin{funcdesc}{call}{*popenargs, **kwargs} Run command with arguments. Wait for command to complete, then return the \member{returncode} attribute. diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 9e326fb..40b04fe 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -125,7 +125,7 @@ appearance of the main window and priority for the new process. This module also defines two shortcut functions: -call(*args, **kwargs): +call(*popenargs, **kwargs): Run command with arguments. Wait for command to complete, then return the returncode attribute. @@ -417,7 +417,7 @@ PIPE = -1 STDOUT = -2 -def call(*args, **kwargs): +def call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete, then return the returncode attribute. @@ -425,7 +425,7 @@ def call(*args, **kwargs): retcode = call(["ls", "-l"]) """ - return Popen(*args, **kwargs).wait() + return Popen(*popenargs, **kwargs).wait() def list2cmdline(seq): |