[Python-checkins] r59164 - python/trunk/Doc/library/subprocess.rst
georg.brandl
python-checkins at python.org
Sat Nov 24 12:31:47 CET 2007
Author: georg.brandl
Date: Sat Nov 24 12:31:46 2007
New Revision: 59164
Modified:
python/trunk/Doc/library/subprocess.rst
Log:
#1344: document that you need to open std{in,out,err} with PIPE if you want
communicate() to work as described.
Modified: python/trunk/Doc/library/subprocess.rst
==============================================================================
--- python/trunk/Doc/library/subprocess.rst (original)
+++ python/trunk/Doc/library/subprocess.rst Sat Nov 24 12:31:46 2007
@@ -195,7 +195,12 @@
communicate() returns a tuple (stdout, stderr).
- .. note::
+ 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::
The data read is buffered in memory, so do not use this method if the data size
is large or unlimited.
More information about the Python-checkins
mailing list