diff options
author | Gregory P. Smith <greg@krypto.org> | 2011-05-23 05:29:49 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2011-05-23 05:29:49 (GMT) |
commit | a454ef6985494ad894c5ec7ebe0ea4c824fc926d (patch) | |
tree | 7eb392d2c0a9d75e9466786ac87fb9340ad24676 /Doc | |
parent | 6352298ac4fd69d80fe33dfca84bd8bd6fe79672 (diff) | |
download | cpython-a454ef6985494ad894c5ec7ebe0ea4c824fc926d.zip cpython-a454ef6985494ad894c5ec7ebe0ea4c824fc926d.tar.gz cpython-a454ef6985494ad894c5ec7ebe0ea4c824fc926d.tar.bz2 |
Update documentation to mention bytes instead byte string and correct one
mentioned string to the accurate description of what type is required.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/subprocess.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index ad5a535..a0d8471 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -311,7 +311,7 @@ This module also defines the following shortcut functions: .. function:: check_output(*popenargs, timeout=None, **kwargs) - Run command with arguments and return its output as a byte string. + Run command with arguments and return its output as a bytes object. If the exit code was non-zero it raises a :exc:`CalledProcessError`. The :exc:`CalledProcessError` object will have the return code in the @@ -447,8 +447,9 @@ Instances of the :class:`Popen` class have the following methods: Interact with process: Send data to stdin. Read data from stdout and stderr, until end-of-file is reached. Wait for process to terminate. The optional - *input* argument should be a byte string to be sent to the child process, or - ``None``, if no data should be sent to the child. + *input* argument should be data to be sent to the child process, or + ``None``, if no data should be sent to the child. The type of *input* + must be bytes or, if *universal_newlines* was ``True``, a string. :meth:`communicate` returns a tuple ``(stdoutdata, stderrdata)``. |