Skip to content

Commit 88031a9

Browse files
Joel Schaerergpshead
Joel Schaerer
authored andcommitted
Update subprocess.communicate() docstring.
Explicitly state that communicate() closes stdin after writing input to it.
1 parent acb9fa7 commit 88031a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/subprocess.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -800,9 +800,9 @@ def _stdin_write(self, input):
800800
raise
801801

802802
def communicate(self, input=None, timeout=None):
803-
"""Interact with process: Send data to stdin. Read data from
804-
stdout and stderr, until end-of-file is reached. Wait for
805-
process to terminate.
803+
"""Interact with process: Send data to stdin and close it.
804+
Read data from stdout and stderr, until end-of-file is
805+
reached. Wait for process to terminate.
806806
807807
The optional "input" argument should be data to be sent to the
808808
child process (if self.universal_newlines is True, this should

0 commit comments

Comments
 (0)