]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Update subprocess.communicate() docstring.
authorJoel Schaerer <joelthelion@laposte.net>
Wed, 13 Sep 2017 19:11:20 +0000 (21:11 +0200)
committerGregory P. Smith <greg@krypto.org>
Wed, 13 Sep 2017 19:11:20 +0000 (12:11 -0700)
Explicitly state that communicate() closes stdin after writing input to it.

Lib/subprocess.py

index 6b90d40564fc8a1b4423140c6758752e059ba6bc..dd994e2aaf152c2c7567b4902710767621acb67a 100644 (file)
@@ -800,9 +800,9 @@ class Popen(object):
                 raise
 
     def communicate(self, input=None, timeout=None):
-        """Interact with process: Send data to stdin.  Read data from
-        stdout and stderr, until end-of-file is reached.  Wait for
-        process to terminate.
+        """Interact with process: Send data to stdin and close it.
+        Read data from stdout and stderr, until end-of-file is
+        reached.  Wait for process to terminate.
 
         The optional "input" argument should be data to be sent to the
         child process (if self.universal_newlines is True, this should