Merged revisions 59774-59783 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r59774 | georg.brandl | 2008-01-06 16:41:50 +0100 (Sun, 06 Jan 2008) | 2 lines
#1501: document that 0**0 == 1.
........
r59775 | georg.brandl | 2008-01-06 16:48:20 +0100 (Sun, 06 Jan 2008) | 2 lines
#759525: document that dir() doesn't return metaclass attrs when given a class as arg.
........
r59776 | georg.brandl | 2008-01-06 16:55:26 +0100 (Sun, 06 Jan 2008) | 2 lines
#1615275: clarify return object types of different tempfile factories.
........
r59777 | georg.brandl | 2008-01-06 17:01:26 +0100 (Sun, 06 Jan 2008) | 2 lines
#1727024: document that Popen.returncode is set by Popen.poll/wait.
........
r59778 | georg.brandl | 2008-01-06 17:04:56 +0100 (Sun, 06 Jan 2008) | 2 lines
#1686390: add example for csv.Sniffer use.
........
r59779 | georg.brandl | 2008-01-06 17:12:39 +0100 (Sun, 06 Jan 2008) | 2 lines
#1559684: document that shutil.copy* doesn't copy all metadata on Posix and Windows too.
........
r59780 | georg.brandl | 2008-01-06 17:17:56 +0100 (Sun, 06 Jan 2008) | 2 lines
#1582: document __reversed__, patch by Mark Russell.
........
r59781 | georg.brandl | 2008-01-06 17:22:56 +0100 (Sun, 06 Jan 2008) | 2 lines
#1499: Document compile() exceptions.
........
r59782 | georg.brandl | 2008-01-06 17:49:50 +0100 (Sun, 06 Jan 2008) | 2 lines
#1325: Add docs and tests for zipimporter.archive and zipimporter.prefix.
........
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index d260473..c876efe 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -172,12 +172,14 @@
.. method:: Popen.poll()
- Check if child process has terminated. Returns returncode attribute.
+ Check if child process has terminated. Set and return :attr:`returncode`
+ attribute.
.. method:: Popen.wait()
- Wait for child process to terminate. Returns returncode attribute.
+ Wait for child process to terminate. Set and return :attr:`returncode`
+ attribute.
.. method:: Popen.communicate(input=None)
@@ -187,21 +189,21 @@
*input* argument should be a string to be sent to the child process, or
``None``, if no data should be sent to the child.
- communicate() returns a tuple (stdout, stderr).
+ :meth:`communicate` returns a tuple ``(stdout, stderr)``.
Note that if you want to send data to the process's stdin, you need to create
the Popen object with ``stdin=PIPE``. Similarly, to get anything other than
``None`` in the result tuple, you need to give ``stdout=PIPE`` and/or
``stderr=PIPE`` too.
-.. note::
+ .. note::
- The data read is buffered in memory, so do not use this method if the data size
- is large or unlimited.
+ The data read is buffered in memory, so do not use this method if the data
+ size is large or unlimited.
+
The following attributes are also available:
-
.. attribute:: Popen.stdin
If the *stdin* argument is ``PIPE``, this attribute is a file object that
@@ -227,9 +229,12 @@
.. attribute:: Popen.returncode
- The child return code. A ``None`` value indicates that the process hasn't
- terminated yet. A negative value -N indicates that the child was terminated by
- signal N (Unix only).
+ The child return code, set by :meth:`poll` and :meth:`wait` (and indirectly
+ by :meth:`communicate`). A ``None`` value indicates that the process
+ hasn't terminated yet.
+
+ A negative value ``-N`` indicates that the child was terminated by signal
+ ``N`` (Unix only).
Replacing Older Functions with the subprocess Module