1
0
Fork 0
python-docs-fr/library/subprocess.po

1348 lines
46 KiB
Plaintext
Raw Normal View History

2016-10-30 09:46:26 +00:00
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2016, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
2017-09-12 11:40:22 +00:00
"POT-Creation-Date: 2017-09-12 13:37+0200\n"
2016-10-30 09:46:26 +00:00
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
2017-05-23 22:40:56 +00:00
"Language: fr\n"
2016-10-30 09:46:26 +00:00
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../Doc/library/subprocess.rst:2
msgid ":mod:`subprocess` --- Subprocess management"
msgstr ""
#: ../Doc/library/subprocess.rst:10
msgid "**Source code:** :source:`Lib/subprocess.py`"
msgstr ""
#: ../Doc/library/subprocess.rst:14
msgid ""
"The :mod:`subprocess` module allows you to spawn new processes, connect to "
"their input/output/error pipes, and obtain their return codes. This module "
"intends to replace several older modules and functions::"
msgstr ""
#: ../Doc/library/subprocess.rst:21
msgid ""
"Information about how the :mod:`subprocess` module can be used to replace "
"these modules and functions can be found in the following sections."
msgstr ""
#: ../Doc/library/subprocess.rst:26
msgid ":pep:`324` -- PEP proposing the subprocess module"
msgstr ""
#: ../Doc/library/subprocess.rst:30
msgid "Using the :mod:`subprocess` Module"
msgstr ""
#: ../Doc/library/subprocess.rst:32
msgid ""
"The recommended approach to invoking subprocesses is to use the :func:`run` "
"function for all use cases it can handle. For more advanced use cases, the "
"underlying :class:`Popen` interface can be used directly."
msgstr ""
#: ../Doc/library/subprocess.rst:36
msgid ""
"The :func:`run` function was added in Python 3.5; if you need to retain "
"compatibility with older versions, see the :ref:`call-function-trio` section."
msgstr ""
#: ../Doc/library/subprocess.rst:44
msgid ""
"Run the command described by *args*. Wait for command to complete, then "
"return a :class:`CompletedProcess` instance."
msgstr ""
#: ../Doc/library/subprocess.rst:47
msgid ""
"The arguments shown above are merely the most common ones, described below "
"in :ref:`frequently-used-arguments` (hence the use of keyword-only notation "
"in the abbreviated signature). The full function signature is largely the "
"same as that of the :class:`Popen` constructor - apart from *timeout*, "
"*input* and *check*, all the arguments to this function are passed through "
"to that interface."
msgstr ""
#: ../Doc/library/subprocess.rst:54
msgid ""
"This does not capture stdout or stderr by default. To do so, pass :data:"
"`PIPE` for the *stdout* and/or *stderr* arguments."
msgstr ""
#: ../Doc/library/subprocess.rst:57
msgid ""
"The *timeout* argument is passed to :meth:`Popen.communicate`. If the "
"timeout expires, the child process will be killed and waited for. The :exc:"
"`TimeoutExpired` exception will be re-raised after the child process has "
"terminated."
msgstr ""
#: ../Doc/library/subprocess.rst:62
msgid ""
"The *input* argument is passed to :meth:`Popen.communicate` and thus to the "
"subprocess's stdin. If used it must be a byte sequence, or a string if "
"*encoding* or *errors* is specified or *universal_newlines* is true. When "
"used, the internal :class:`Popen` object is automatically created with "
"``stdin=PIPE``, and the *stdin* argument may not be used as well."
msgstr ""
#: ../Doc/library/subprocess.rst:68
msgid ""
"If *check* is true, and the process exits with a non-zero exit code, a :exc:"
"`CalledProcessError` exception will be raised. Attributes of that exception "
"hold the arguments, the exit code, and stdout and stderr if they were "
"captured."
msgstr ""
#: ../Doc/library/subprocess.rst:73
msgid ""
"If *encoding* or *errors* are specified, or *universal_newlines* is true, "
"file objects for stdin, stdout and stderr are opened in text mode using the "
"specified *encoding* and *errors* or the :class:`io.TextIOWrapper` default. "
"Otherwise, file objects are opened in binary mode."
msgstr ""
#: ../Doc/library/subprocess.rst:78
msgid "Examples::"
msgstr "Exemples : ::"
#: ../Doc/library/subprocess.rst:96
msgid "Added *encoding* and *errors* parameters"
msgstr ""
#: ../Doc/library/subprocess.rst:100
msgid ""
"The return value from :func:`run`, representing a process that has finished."
msgstr ""
#: ../Doc/library/subprocess.rst:104
msgid ""
"The arguments used to launch the process. This may be a list or a string."
msgstr ""
#: ../Doc/library/subprocess.rst:108
msgid ""
"Exit status of the child process. Typically, an exit status of 0 indicates "
"that it ran successfully."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:111 ../Doc/library/subprocess.rst:745
2016-10-30 09:46:26 +00:00
msgid ""
"A negative value ``-N`` indicates that the child was terminated by signal "
"``N`` (POSIX only)."
msgstr ""
#: ../Doc/library/subprocess.rst:116
msgid ""
"Captured stdout from the child process. A bytes sequence, or a string if :"
"func:`run` was called with an encoding or errors. ``None`` if stdout was not "
"captured."
msgstr ""
#: ../Doc/library/subprocess.rst:120
msgid ""
"If you ran the process with ``stderr=subprocess.STDOUT``, stdout and stderr "
"will be combined in this attribute, and :attr:`stderr` will be ``None``."
msgstr ""
#: ../Doc/library/subprocess.rst:126
msgid ""
"Captured stderr from the child process. A bytes sequence, or a string if :"
"func:`run` was called with an encoding or errors. ``None`` if stderr was not "
"captured."
msgstr ""
#: ../Doc/library/subprocess.rst:132
msgid "If :attr:`returncode` is non-zero, raise a :exc:`CalledProcessError`."
msgstr ""
#: ../Doc/library/subprocess.rst:138
msgid ""
"Special value that can be used as the *stdin*, *stdout* or *stderr* argument "
"to :class:`Popen` and indicates that the special file :data:`os.devnull` "
"will be used."
msgstr ""
#: ../Doc/library/subprocess.rst:147
msgid ""
"Special value that can be used as the *stdin*, *stdout* or *stderr* argument "
"to :class:`Popen` and indicates that a pipe to the standard stream should be "
"opened. Most useful with :meth:`Popen.communicate`."
msgstr ""
#: ../Doc/library/subprocess.rst:154
msgid ""
"Special value that can be used as the *stderr* argument to :class:`Popen` "
"and indicates that standard error should go into the same handle as standard "
"output."
msgstr ""
#: ../Doc/library/subprocess.rst:161
msgid "Base class for all other exceptions from this module."
msgstr ""
#: ../Doc/library/subprocess.rst:168
msgid ""
"Subclass of :exc:`SubprocessError`, raised when a timeout expires while "
"waiting for a child process."
msgstr ""
#: ../Doc/library/subprocess.rst:173 ../Doc/library/subprocess.rst:210
msgid "Command that was used to spawn the child process."
msgstr ""
#: ../Doc/library/subprocess.rst:177
msgid "Timeout in seconds."
msgstr ""
#: ../Doc/library/subprocess.rst:181 ../Doc/library/subprocess.rst:214
msgid ""
"Output of the child process if it was captured by :func:`run` or :func:"
"`check_output`. Otherwise, ``None``."
msgstr ""
#: ../Doc/library/subprocess.rst:186 ../Doc/library/subprocess.rst:219
msgid "Alias for output, for symmetry with :attr:`stderr`."
msgstr ""
#: ../Doc/library/subprocess.rst:190 ../Doc/library/subprocess.rst:223
msgid ""
"Stderr output of the child process if it was captured by :func:`run`. "
"Otherwise, ``None``."
msgstr ""
#: ../Doc/library/subprocess.rst:195 ../Doc/library/subprocess.rst:226
msgid "*stdout* and *stderr* attributes added"
msgstr ""
#: ../Doc/library/subprocess.rst:200
msgid ""
"Subclass of :exc:`SubprocessError`, raised when a process run by :func:"
"`check_call` or :func:`check_output` returns a non-zero exit status."
msgstr ""
#: ../Doc/library/subprocess.rst:205
msgid ""
"Exit status of the child process. If the process exited due to a signal, "
"this will be the negative signal number."
msgstr ""
#: ../Doc/library/subprocess.rst:233
msgid "Frequently Used Arguments"
msgstr ""
#: ../Doc/library/subprocess.rst:235
msgid ""
"To support a wide variety of use cases, the :class:`Popen` constructor (and "
"the convenience functions) accept a large number of optional arguments. For "
"most typical use cases, many of these arguments can be safely left at their "
"default values. The arguments that are most commonly needed are:"
msgstr ""
#: ../Doc/library/subprocess.rst:240
msgid ""
"*args* is required for all calls and should be a string, or a sequence of "
"program arguments. Providing a sequence of arguments is generally preferred, "
"as it allows the module to take care of any required escaping and quoting of "
"arguments (e.g. to permit spaces in file names). If passing a single string, "
"either *shell* must be :const:`True` (see below) or else the string must "
"simply name the program to be executed without specifying any arguments."
msgstr ""
#: ../Doc/library/subprocess.rst:248
msgid ""
"*stdin*, *stdout* and *stderr* specify the executed program's standard "
"input, standard output and standard error file handles, respectively. Valid "
"values are :data:`PIPE`, :data:`DEVNULL`, an existing file descriptor (a "
"positive integer), an existing file object, and ``None``. :data:`PIPE` "
"indicates that a new pipe to the child should be created. :data:`DEVNULL` "
"indicates that the special file :data:`os.devnull` will be used. With the "
"default settings of ``None``, no redirection will occur; the child's file "
"handles will be inherited from the parent. Additionally, *stderr* can be :"
"data:`STDOUT`, which indicates that the stderr data from the child process "
"should be captured into the same file handle as for *stdout*."
msgstr ""
#: ../Doc/library/subprocess.rst:262
msgid ""
"If *encoding* or *errors* are specified, or *universal_newlines* is true, "
"the file objects *stdin*, *stdout* and *stderr* will be opened in text mode "
"using the *encoding* and *errors* specified in the call or the defaults for :"
"class:`io.TextIOWrapper`."
msgstr ""
#: ../Doc/library/subprocess.rst:267
msgid ""
"For *stdin*, line ending characters ``'\\n'`` in the input will be converted "
"to the default line separator :data:`os.linesep`. For *stdout* and *stderr*, "
"all line endings in the output will be converted to ``'\\n'``. For more "
"information see the documentation of the :class:`io.TextIOWrapper` class "
"when the *newline* argument to its constructor is ``None``."
msgstr ""
#: ../Doc/library/subprocess.rst:273
msgid ""
"If text mode is not used, *stdin*, *stdout* and *stderr* will be opened as "
"binary streams. No encoding or line ending conversion is performed."
msgstr ""
#: ../Doc/library/subprocess.rst:276
msgid "Added *encoding* and *errors* parameters."
msgstr ""
#: ../Doc/library/subprocess.rst:281
msgid ""
"The newlines attribute of the file objects :attr:`Popen.stdin`, :attr:`Popen."
"stdout` and :attr:`Popen.stderr` are not updated by the :meth:`Popen."
"communicate` method."
msgstr ""
#: ../Doc/library/subprocess.rst:285
msgid ""
"If *shell* is ``True``, the specified command will be executed through the "
"shell. This can be useful if you are using Python primarily for the "
"enhanced control flow it offers over most system shells and still want "
"convenient access to other shell features such as shell pipes, filename "
"wildcards, environment variable expansion, and expansion of ``~`` to a "
"user's home directory. However, note that Python itself offers "
"implementations of many shell-like features (in particular, :mod:`glob`, :"
"mod:`fnmatch`, :func:`os.walk`, :func:`os.path.expandvars`, :func:`os.path."
"expanduser`, and :mod:`shutil`)."
msgstr ""
#: ../Doc/library/subprocess.rst:295
msgid ""
"When *universal_newlines* is ``True``, the class uses the encoding :func:"
"`locale.getpreferredencoding(False) <locale.getpreferredencoding>` instead "
"of ``locale.getpreferredencoding()``. See the :class:`io.TextIOWrapper` "
"class for more information on this change."
msgstr ""
#: ../Doc/library/subprocess.rst:303 ../Doc/library/subprocess.rst:387
msgid ""
"Read the `Security Considerations`_ section before using ``shell=True``."
msgstr ""
#: ../Doc/library/subprocess.rst:305
msgid ""
"These options, along with all of the other options, are described in more "
"detail in the :class:`Popen` constructor documentation."
msgstr ""
#: ../Doc/library/subprocess.rst:310
msgid "Popen Constructor"
msgstr ""
#: ../Doc/library/subprocess.rst:312
msgid ""
"The underlying process creation and management in this module is handled by "
"the :class:`Popen` class. It offers a lot of flexibility so that developers "
"are able to handle the less common cases not covered by the convenience "
"functions."
msgstr ""
#: ../Doc/library/subprocess.rst:325
msgid ""
"Execute a child program in a new process. On POSIX, the class uses :meth:"
"`os.execvp`-like behavior to execute the child program. On Windows, the "
"class uses the Windows ``CreateProcess()`` function. The arguments to :"
"class:`Popen` are as follows."
msgstr ""
#: ../Doc/library/subprocess.rst:330
msgid ""
"*args* should be a sequence of program arguments or else a single string. By "
"default, the program to execute is the first item in *args* if *args* is a "
"sequence. If *args* is a string, the interpretation is platform-dependent "
"and described below. See the *shell* and *executable* arguments for "
"additional differences from the default behavior. Unless otherwise stated, "
"it is recommended to pass *args* as a sequence."
msgstr ""
#: ../Doc/library/subprocess.rst:337
msgid ""
"On POSIX, if *args* is a string, the string is interpreted as the name or "
"path of the program to execute. However, this can only be done if not "
"passing arguments to the program."
msgstr ""
#: ../Doc/library/subprocess.rst:343
msgid ""
":meth:`shlex.split` can be useful when determining the correct tokenization "
"for *args*, especially in complex cases::"
msgstr ""
#: ../Doc/library/subprocess.rst:354
msgid ""
"Note in particular that options (such as *-input*) and arguments (such as "
"*eggs.txt*) that are separated by whitespace in the shell go in separate "
"list elements, while arguments that need quoting or backslash escaping when "
"used in the shell (such as filenames containing spaces or the *echo* command "
"shown above) are single list elements."
msgstr ""
#: ../Doc/library/subprocess.rst:360
msgid ""
"On Windows, if *args* is a sequence, it will be converted to a string in a "
"manner described in :ref:`converting-argument-sequence`. This is because "
"the underlying ``CreateProcess()`` operates on strings."
msgstr ""
#: ../Doc/library/subprocess.rst:364
msgid ""
"The *shell* argument (which defaults to ``False``) specifies whether to use "
"the shell as the program to execute. If *shell* is ``True``, it is "
"recommended to pass *args* as a string rather than as a sequence."
msgstr ""
#: ../Doc/library/subprocess.rst:368
msgid ""
"On POSIX with ``shell=True``, the shell defaults to :file:`/bin/sh`. If "
"*args* is a string, the string specifies the command to execute through the "
"shell. This means that the string must be formatted exactly as it would be "
"when typed at the shell prompt. This includes, for example, quoting or "
"backslash escaping filenames with spaces in them. If *args* is a sequence, "
"the first item specifies the command string, and any additional items will "
"be treated as additional arguments to the shell itself. That is to say, :"
"class:`Popen` does the equivalent of::"
msgstr ""
#: ../Doc/library/subprocess.rst:379
msgid ""
"On Windows with ``shell=True``, the :envvar:`COMSPEC` environment variable "
"specifies the default shell. The only time you need to specify "
"``shell=True`` on Windows is when the command you wish to execute is built "
"into the shell (e.g. :command:`dir` or :command:`copy`). You do not need "
"``shell=True`` to run a batch file or console-based executable."
msgstr ""
#: ../Doc/library/subprocess.rst:389
msgid ""
"*bufsize* will be supplied as the corresponding argument to the :func:`open` "
"function when creating the stdin/stdout/stderr pipe file objects:"
msgstr ""
#: ../Doc/library/subprocess.rst:393
msgid ""
":const:`0` means unbuffered (read and write are one system call and can "
"return short)"
msgstr ""
#: ../Doc/library/subprocess.rst:395
msgid ""
":const:`1` means line buffered (only usable if ``universal_newlines=True`` i."
"e., in a text mode)"
msgstr ""
#: ../Doc/library/subprocess.rst:397
msgid "any other positive value means use a buffer of approximately that size"
msgstr ""
#: ../Doc/library/subprocess.rst:399
msgid ""
"negative bufsize (the default) means the system default of io."
"DEFAULT_BUFFER_SIZE will be used."
msgstr ""
#: ../Doc/library/subprocess.rst:402
msgid ""
"*bufsize* now defaults to -1 to enable buffering by default to match the "
"behavior that most code expects. In versions prior to Python 3.2.4 and "
"3.3.1 it incorrectly defaulted to :const:`0` which was unbuffered and "
"allowed short reads. This was unintentional and did not match the behavior "
"of Python 2 as most code expected."
msgstr ""
#: ../Doc/library/subprocess.rst:409
msgid ""
"The *executable* argument specifies a replacement program to execute. It "
"is very seldom needed. When ``shell=False``, *executable* replaces the "
"program to execute specified by *args*. However, the original *args* is "
"still passed to the program. Most programs treat the program specified by "
"*args* as the command name, which can then be different from the program "
"actually executed. On POSIX, the *args* name becomes the display name for "
"the executable in utilities such as :program:`ps`. If ``shell=True``, on "
"POSIX the *executable* argument specifies a replacement shell for the "
"default :file:`/bin/sh`."
msgstr ""
#: ../Doc/library/subprocess.rst:419
msgid ""
"*stdin*, *stdout* and *stderr* specify the executed program's standard "
"input, standard output and standard error file handles, respectively. Valid "
"values are :data:`PIPE`, :data:`DEVNULL`, an existing file descriptor (a "
"positive integer), an existing :term:`file object`, and ``None``. :data:"
"`PIPE` indicates that a new pipe to the child should be created. :data:"
"`DEVNULL` indicates that the special file :data:`os.devnull` will be used. "
"With the default settings of ``None``, no redirection will occur; the "
"child's file handles will be inherited from the parent. Additionally, "
"*stderr* can be :data:`STDOUT`, which indicates that the stderr data from "
"the applications should be captured into the same file handle as for stdout."
msgstr ""
#: ../Doc/library/subprocess.rst:430
msgid ""
"If *preexec_fn* is set to a callable object, this object will be called in "
"the child process just before the child is executed. (POSIX only)"
msgstr ""
#: ../Doc/library/subprocess.rst:436
msgid ""
"The *preexec_fn* parameter is not safe to use in the presence of threads in "
"your application. The child process could deadlock before exec is called. "
"If you must use it, keep it trivial! Minimize the number of libraries you "
"call into."
msgstr ""
#: ../Doc/library/subprocess.rst:444
msgid ""
"If you need to modify the environment for the child use the *env* parameter "
"rather than doing it in a *preexec_fn*. The *start_new_session* parameter "
"can take the place of a previously common use of *preexec_fn* to call os."
"setsid() in the child."
msgstr ""
#: ../Doc/library/subprocess.rst:449
msgid ""
"If *close_fds* is true, all file descriptors except :const:`0`, :const:`1` "
"and :const:`2` will be closed before the child process is executed. (POSIX "
"only). The default varies by platform: Always true on POSIX. On Windows it "
"is true when *stdin*/*stdout*/*stderr* are :const:`None`, false otherwise. "
"On Windows, if *close_fds* is true then no handles will be inherited by the "
"child process. Note that on Windows, you cannot set *close_fds* to true and "
"also redirect the standard handles by setting *stdin*, *stdout* or *stderr*."
msgstr ""
#: ../Doc/library/subprocess.rst:457
msgid ""
"The default for *close_fds* was changed from :const:`False` to what is "
"described above."
msgstr ""
#: ../Doc/library/subprocess.rst:461
msgid ""
"*pass_fds* is an optional sequence of file descriptors to keep open between "
"the parent and child. Providing any *pass_fds* forces *close_fds* to be :"
"const:`True`. (POSIX only)"
msgstr ""
#: ../Doc/library/subprocess.rst:465
msgid "The *pass_fds* parameter was added."
msgstr ""
#: ../Doc/library/subprocess.rst:468
msgid ""
"If *cwd* is not ``None``, the function changes the working directory to "
2017-04-02 20:14:06 +00:00
"*cwd* before executing the child. *cwd* can be a :class:`str` and :term:"
"`path-like <path-like object>` object. In particular, the function looks "
"for *executable* (or for the first item in *args*) relative to *cwd* if the "
2016-10-30 09:46:26 +00:00
"executable path is a relative path."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:474
msgid "*cwd* parameter accepts a :term:`path-like object`."
msgstr ""
#: ../Doc/library/subprocess.rst:477
2016-10-30 09:46:26 +00:00
msgid ""
"If *restore_signals* is true (the default) all signals that Python has set "
"to SIG_IGN are restored to SIG_DFL in the child process before the exec. "
"Currently this includes the SIGPIPE, SIGXFZ and SIGXFSZ signals. (POSIX only)"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:482
2016-10-30 09:46:26 +00:00
msgid "*restore_signals* was added."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:485
2016-10-30 09:46:26 +00:00
msgid ""
"If *start_new_session* is true the setsid() system call will be made in the "
"child process prior to the execution of the subprocess. (POSIX only)"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:488
2016-10-30 09:46:26 +00:00
msgid "*start_new_session* was added."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:491
2016-10-30 09:46:26 +00:00
msgid ""
"If *env* is not ``None``, it must be a mapping that defines the environment "
"variables for the new process; these are used instead of the default "
"behavior of inheriting the current process' environment."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:497
2016-10-30 09:46:26 +00:00
msgid ""
"If specified, *env* must provide any variables required for the program to "
"execute. On Windows, in order to run a `side-by-side assembly`_ the "
"specified *env* **must** include a valid :envvar:`SystemRoot`."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:503
2016-10-30 09:46:26 +00:00
msgid ""
"If *encoding* or *errors* are specified, the file objects *stdin*, *stdout* "
"and *stderr* are opened in text mode with the specified encoding and "
"*errors*, as described above in :ref:`frequently-used-arguments`. If "
"*universal_newlines* is ``True``, they are opened in text mode with default "
"encoding. Otherwise, they are opened as binary streams."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:509
2016-10-30 09:46:26 +00:00
msgid "*encoding* and *errors* were added."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:512
2016-10-30 09:46:26 +00:00
msgid ""
"If given, *startupinfo* will be a :class:`STARTUPINFO` object, which is "
"passed to the underlying ``CreateProcess`` function. *creationflags*, if "
"given, can be :data:`CREATE_NEW_CONSOLE` or :data:"
"`CREATE_NEW_PROCESS_GROUP`. (Windows only)"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:517
2016-10-30 09:46:26 +00:00
msgid ""
"Popen objects are supported as context managers via the :keyword:`with` "
"statement: on exit, standard file descriptors are closed, and the process is "
"waited for. ::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:524
2016-10-30 09:46:26 +00:00
msgid "Added context manager support."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:527
2016-10-30 09:46:26 +00:00
msgid ""
"Popen destructor now emits a :exc:`ResourceWarning` warning if the child "
"process is still running."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:533
2016-10-30 09:46:26 +00:00
msgid "Exceptions"
msgstr "Les exceptions"
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:535
2016-10-30 09:46:26 +00:00
msgid ""
"Exceptions raised in the child process, before the new program has started "
"to execute, will be re-raised in the parent. Additionally, the exception "
"object will have one extra attribute called :attr:`child_traceback`, which "
"is a string containing traceback information from the child's point of view."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:540
2016-10-30 09:46:26 +00:00
msgid ""
"The most common exception raised is :exc:`OSError`. This occurs, for "
"example, when trying to execute a non-existent file. Applications should "
"prepare for :exc:`OSError` exceptions."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:544
2016-10-30 09:46:26 +00:00
msgid ""
"A :exc:`ValueError` will be raised if :class:`Popen` is called with invalid "
"arguments."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:547
2016-10-30 09:46:26 +00:00
msgid ""
":func:`check_call` and :func:`check_output` will raise :exc:"
"`CalledProcessError` if the called process returns a non-zero return code."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:551
2016-10-30 09:46:26 +00:00
msgid ""
"All of the functions and methods that accept a *timeout* parameter, such as :"
"func:`call` and :meth:`Popen.communicate` will raise :exc:`TimeoutExpired` "
"if the timeout expires before the process exits."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:555
2016-10-30 09:46:26 +00:00
msgid ""
"Exceptions defined in this module all inherit from :exc:`SubprocessError`."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:557
2016-10-30 09:46:26 +00:00
msgid "The :exc:`SubprocessError` base class was added."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:562
2016-10-30 09:46:26 +00:00
msgid "Security Considerations"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:564
2016-10-30 09:46:26 +00:00
msgid ""
"Unlike some other popen functions, this implementation will never implicitly "
"call a system shell. This means that all characters, including shell "
"metacharacters, can safely be passed to child processes. If the shell is "
"invoked explicitly, via ``shell=True``, it is the application's "
"responsibility to ensure that all whitespace and metacharacters are quoted "
"appropriately to avoid `shell injection <https://en.wikipedia.org/wiki/"
"Shell_injection#Shell_injection>`_ vulnerabilities."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:573
2016-10-30 09:46:26 +00:00
msgid ""
"When using ``shell=True``, the :func:`shlex.quote` function can be used to "
"properly escape whitespace and shell metacharacters in strings that are "
"going to be used to construct shell commands."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:579
2016-10-30 09:46:26 +00:00
msgid "Popen Objects"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:581
2016-10-30 09:46:26 +00:00
msgid "Instances of the :class:`Popen` class have the following methods:"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:586
2016-10-30 09:46:26 +00:00
msgid ""
"Check if child process has terminated. Set and return :attr:`~Popen."
"returncode` attribute."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:592
2016-10-30 09:46:26 +00:00
msgid ""
"Wait for child process to terminate. Set and return :attr:`~Popen."
"returncode` attribute."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:595
2016-10-30 09:46:26 +00:00
msgid ""
"If the process does not terminate after *timeout* seconds, raise a :exc:"
"`TimeoutExpired` exception. It is safe to catch this exception and retry "
"the wait."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:601
2016-10-30 09:46:26 +00:00
msgid ""
"This will deadlock when using ``stdout=PIPE`` or ``stderr=PIPE`` and the "
"child process generates enough output to a pipe such that it blocks waiting "
"for the OS pipe buffer to accept more data. Use :meth:`Popen.communicate` "
"when using pipes to avoid that."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:608
2016-10-30 09:46:26 +00:00
msgid ""
"The function is implemented using a busy loop (non-blocking call and short "
"sleeps). Use the :mod:`asyncio` module for an asynchronous wait: see :class:"
"`asyncio.create_subprocess_exec`."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:612 ../Doc/library/subprocess.rst:658
#: ../Doc/library/subprocess.rst:882 ../Doc/library/subprocess.rst:910
#: ../Doc/library/subprocess.rst:953
2016-10-30 09:46:26 +00:00
msgid "*timeout* was added."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:617
2016-10-30 09:46:26 +00:00
msgid ""
"Do not use the *endtime* parameter. It is was unintentionally exposed in "
"3.3 but was left undocumented as it was intended to be private for internal "
"use. Use *timeout* instead."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:623
2016-10-30 09:46:26 +00:00
msgid ""
"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 data to be sent to the child process, or "
"``None``, if no data should be sent to the child. If streams were opened in "
"text mode, *input* must be a string. Otherwise, it must be bytes."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:629
2016-10-30 09:46:26 +00:00
msgid ""
":meth:`communicate` returns a tuple ``(stdout_data, stderr_data)``. The data "
"will be strings if streams were opened in text mode; otherwise, bytes."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:633
2016-10-30 09:46:26 +00:00
msgid ""
"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."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:638
2016-10-30 09:46:26 +00:00
msgid ""
"If the process does not terminate after *timeout* seconds, a :exc:"
"`TimeoutExpired` exception will be raised. Catching this exception and "
"retrying communication will not lose any output."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:642
2016-10-30 09:46:26 +00:00
msgid ""
"The child process is not killed if the timeout expires, so in order to "
"cleanup properly a well-behaved application should kill the child process "
"and finish communication::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:655
2016-10-30 09:46:26 +00:00
msgid ""
"The data read is buffered in memory, so do not use this method if the data "
"size is large or unlimited."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:664
2016-10-30 09:46:26 +00:00
msgid "Sends the signal *signal* to the child."
msgstr "Envoie le signal *signal* au fils."
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:668
2016-10-30 09:46:26 +00:00
msgid ""
"On Windows, SIGTERM is an alias for :meth:`terminate`. CTRL_C_EVENT and "
"CTRL_BREAK_EVENT can be sent to processes started with a *creationflags* "
"parameter which includes `CREATE_NEW_PROCESS_GROUP`."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:675
2016-10-30 09:46:26 +00:00
msgid ""
"Stop the child. On Posix OSs the method sends SIGTERM to the child. On "
"Windows the Win32 API function :c:func:`TerminateProcess` is called to stop "
"the child."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:682
2016-10-30 09:46:26 +00:00
msgid ""
"Kills the child. On Posix OSs the function sends SIGKILL to the child. On "
"Windows :meth:`kill` is an alias for :meth:`terminate`."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:686
2016-10-30 09:46:26 +00:00
msgid "The following attributes are also available:"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:690
2016-10-30 09:46:26 +00:00
msgid ""
"The *args* argument as it was passed to :class:`Popen` -- a sequence of "
"program arguments or else a single string."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:697
2016-10-30 09:46:26 +00:00
msgid ""
"If the *stdin* argument was :data:`PIPE`, this attribute is a writeable "
"stream object as returned by :func:`open`. If the *encoding* or *errors* "
"arguments were specified or the *universal_newlines* argument was ``True``, "
"the stream is a text stream, otherwise it is a byte stream. If the *stdin* "
"argument was not :data:`PIPE`, this attribute is ``None``."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:706
2016-10-30 09:46:26 +00:00
msgid ""
"If the *stdout* argument was :data:`PIPE`, this attribute is a readable "
"stream object as returned by :func:`open`. Reading from the stream provides "
"output from the child process. If the *encoding* or *errors* arguments were "
"specified or the *universal_newlines* argument was ``True``, the stream is a "
"text stream, otherwise it is a byte stream. If the *stdout* argument was "
"not :data:`PIPE`, this attribute is ``None``."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:716
2016-10-30 09:46:26 +00:00
msgid ""
"If the *stderr* argument was :data:`PIPE`, this attribute is a readable "
"stream object as returned by :func:`open`. Reading from the stream provides "
"error output from the child process. If the *encoding* or *errors* arguments "
"were specified or the *universal_newlines* argument was ``True``, the stream "
"is a text stream, otherwise it is a byte stream. If the *stderr* argument "
"was not :data:`PIPE`, this attribute is ``None``."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:725
2016-10-30 09:46:26 +00:00
msgid ""
"Use :meth:`~Popen.communicate` rather than :attr:`.stdin.write <Popen."
"stdin>`, :attr:`.stdout.read <Popen.stdout>` or :attr:`.stderr.read <Popen."
"stderr>` to avoid deadlocks due to any of the other OS pipe buffers filling "
"up and blocking the child process."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:733
2016-10-30 09:46:26 +00:00
msgid "The process ID of the child process."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:735
2016-10-30 09:46:26 +00:00
msgid ""
"Note that if you set the *shell* argument to ``True``, this is the process "
"ID of the spawned shell."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:741
2016-10-30 09:46:26 +00:00
msgid ""
"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."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:750
2016-10-30 09:46:26 +00:00
msgid "Windows Popen Helpers"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:752
2016-10-30 09:46:26 +00:00
msgid ""
"The :class:`STARTUPINFO` class and following constants are only available on "
"Windows."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:757
2016-10-30 09:46:26 +00:00
msgid ""
"Partial support of the Windows `STARTUPINFO <https://msdn.microsoft.com/en-"
"us/library/ms686331(v=vs.85).aspx>`__ structure is used for :class:`Popen` "
"creation."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:763
2016-10-30 09:46:26 +00:00
msgid ""
"A bit field that determines whether certain :class:`STARTUPINFO` attributes "
"are used when the process creates a window. ::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:771
2016-10-30 09:46:26 +00:00
msgid ""
"If :attr:`dwFlags` specifies :data:`STARTF_USESTDHANDLES`, this attribute is "
"the standard input handle for the process. If :data:`STARTF_USESTDHANDLES` "
"is not specified, the default for standard input is the keyboard buffer."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:778
2016-10-30 09:46:26 +00:00
msgid ""
"If :attr:`dwFlags` specifies :data:`STARTF_USESTDHANDLES`, this attribute is "
"the standard output handle for the process. Otherwise, this attribute is "
"ignored and the default for standard output is the console window's buffer."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:785
2016-10-30 09:46:26 +00:00
msgid ""
"If :attr:`dwFlags` specifies :data:`STARTF_USESTDHANDLES`, this attribute is "
"the standard error handle for the process. Otherwise, this attribute is "
"ignored and the default for standard error is the console window's buffer."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:791
2016-10-30 09:46:26 +00:00
msgid ""
"If :attr:`dwFlags` specifies :data:`STARTF_USESHOWWINDOW`, this attribute "
"can be any of the values that can be specified in the ``nCmdShow`` parameter "
"for the `ShowWindow <https://msdn.microsoft.com/en-us/library/"
"ms633548(v=vs.85).aspx>`__ function, except for ``SW_SHOWDEFAULT``. "
"Otherwise, this attribute is ignored."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:798
2016-10-30 09:46:26 +00:00
msgid ""
":data:`SW_HIDE` is provided for this attribute. It is used when :class:"
"`Popen` is called with ``shell=True``."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:803
2016-10-30 09:46:26 +00:00
msgid "Constants"
2017-03-05 09:57:28 +00:00
msgstr "Constantes"
2016-10-30 09:46:26 +00:00
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:805
2016-10-30 09:46:26 +00:00
msgid "The :mod:`subprocess` module exposes the following constants."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:809
2016-10-30 09:46:26 +00:00
msgid ""
"The standard input device. Initially, this is the console input buffer, "
"``CONIN$``."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:814
2016-10-30 09:46:26 +00:00
msgid ""
"The standard output device. Initially, this is the active console screen "
"buffer, ``CONOUT$``."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:819
2016-10-30 09:46:26 +00:00
msgid ""
"The standard error device. Initially, this is the active console screen "
"buffer, ``CONOUT$``."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:824
2016-10-30 09:46:26 +00:00
msgid "Hides the window. Another window will be activated."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:828
2016-10-30 09:46:26 +00:00
msgid ""
"Specifies that the :attr:`STARTUPINFO.hStdInput`, :attr:`STARTUPINFO."
"hStdOutput`, and :attr:`STARTUPINFO.hStdError` attributes contain additional "
"information."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:834
2016-10-30 09:46:26 +00:00
msgid ""
"Specifies that the :attr:`STARTUPINFO.wShowWindow` attribute contains "
"additional information."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:839
2016-10-30 09:46:26 +00:00
msgid ""
"The new process has a new console, instead of inheriting its parent's "
"console (the default)."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:844
2016-10-30 09:46:26 +00:00
msgid ""
"A :class:`Popen` ``creationflags`` parameter to specify that a new process "
"group will be created. This flag is necessary for using :func:`os.kill` on "
"the subprocess."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:848
2016-10-30 09:46:26 +00:00
msgid "This flag is ignored if :data:`CREATE_NEW_CONSOLE` is specified."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:853
2016-10-30 09:46:26 +00:00
msgid "Older high-level API"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:855
2016-10-30 09:46:26 +00:00
msgid ""
"Prior to Python 3.5, these three functions comprised the high level API to "
"subprocess. You can now use :func:`run` in many cases, but lots of existing "
"code calls these functions."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:861
2016-10-30 09:46:26 +00:00
msgid ""
"Run the command described by *args*. Wait for command to complete, then "
"return the :attr:`~Popen.returncode` attribute."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:864 ../Doc/library/subprocess.rst:892
#: ../Doc/library/subprocess.rst:925
2016-10-30 09:46:26 +00:00
msgid "This is equivalent to::"
msgstr "Cest équivalent à ::"
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:868
2016-10-30 09:46:26 +00:00
msgid "(except that the *input* and *check* parameters are not supported)"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:870 ../Doc/library/subprocess.rst:898
2016-10-30 09:46:26 +00:00
msgid ""
"The arguments shown above are merely the most common ones. The full function "
"signature is largely the same as that of the :class:`Popen` constructor - "
"this function passes all supplied arguments other than *timeout* directly "
"through to that interface."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:877 ../Doc/library/subprocess.rst:905
2016-10-30 09:46:26 +00:00
msgid ""
"Do not use ``stdout=PIPE`` or ``stderr=PIPE`` with this function. The child "
"process will block if it generates enough output to a pipe to fill up the OS "
"pipe buffer as the pipes are not being read from."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:887
2016-10-30 09:46:26 +00:00
msgid ""
"Run command with arguments. Wait for command to complete. If the return "
"code was zero then return, otherwise raise :exc:`CalledProcessError`. The :"
"exc:`CalledProcessError` object will have the return code in the :attr:"
"`~CalledProcessError.returncode` attribute."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:896
2016-10-30 09:46:26 +00:00
msgid "(except that the *input* parameter is not supported)"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:918
2016-10-30 09:46:26 +00:00
msgid "Run command with arguments and return its output."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:920
2016-10-30 09:46:26 +00:00
msgid ""
"If the return code was non-zero it raises a :exc:`CalledProcessError`. The :"
"exc:`CalledProcessError` object will have the return code in the :attr:"
"`~CalledProcessError.returncode` attribute and any output in the :attr:"
"`~CalledProcessError.output` attribute."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:929
2016-10-30 09:46:26 +00:00
msgid ""
"The arguments shown above are merely the most common ones. The full function "
"signature is largely the same as that of :func:`run` - most arguments are "
"passed directly through to that interface. However, explicitly passing "
"``input=None`` to inherit the parent's standard input file handle is not "
"supported."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:935
2016-10-30 09:46:26 +00:00
msgid ""
"By default, this function will return the data as encoded bytes. The actual "
"encoding of the output data may depend on the command being invoked, so the "
"decoding to text will often need to be handled at the application level."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:939
2016-10-30 09:46:26 +00:00
msgid ""
"This behaviour may be overridden by setting *universal_newlines* to ``True`` "
"as described above in :ref:`frequently-used-arguments`."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:942
2016-10-30 09:46:26 +00:00
msgid ""
"To also capture standard error in the result, use ``stderr=subprocess."
"STDOUT``::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:956
2016-10-30 09:46:26 +00:00
msgid "Support for the *input* keyword argument was added."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:962
2016-10-30 09:46:26 +00:00
msgid "Replacing Older Functions with the :mod:`subprocess` Module"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:964
2016-10-30 09:46:26 +00:00
msgid ""
"In this section, \"a becomes b\" means that b can be used as a replacement "
"for a."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:968
2016-10-30 09:46:26 +00:00
msgid ""
"All \"a\" functions in this section fail (more or less) silently if the "
"executed program cannot be found; the \"b\" replacements raise :exc:"
"`OSError` instead."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:972
2016-10-30 09:46:26 +00:00
msgid ""
"In addition, the replacements using :func:`check_output` will fail with a :"
"exc:`CalledProcessError` if the requested operation produces a non-zero "
"return code. The output is still available as the :attr:`~CalledProcessError."
"output` attribute of the raised exception."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:977
2016-10-30 09:46:26 +00:00
msgid ""
"In the following examples, we assume that the relevant functions have "
"already been imported from the :mod:`subprocess` module."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:982
2016-10-30 09:46:26 +00:00
msgid "Replacing /bin/sh shell backquote"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:988 ../Doc/library/subprocess.rst:999
#: ../Doc/library/subprocess.rst:1016
2016-10-30 09:46:26 +00:00
msgid "becomes::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:993
2016-10-30 09:46:26 +00:00
msgid "Replacing shell pipeline"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1006
2016-10-30 09:46:26 +00:00
msgid ""
"The p1.stdout.close() call after starting the p2 is important in order for "
"p1 to receive a SIGPIPE if p2 exits before p1."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1009
2016-10-30 09:46:26 +00:00
msgid ""
"Alternatively, for trusted input, the shell's own pipeline support may still "
"be used directly:"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1022
2016-10-30 09:46:26 +00:00
msgid "Replacing :func:`os.system`"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1030
2016-10-30 09:46:26 +00:00
msgid "Notes:"
msgstr "Notes : "
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1032
2016-10-30 09:46:26 +00:00
msgid "Calling the program through the shell is usually not required."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1034
2016-10-30 09:46:26 +00:00
msgid "A more realistic example would look like this::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1047
2016-10-30 09:46:26 +00:00
msgid "Replacing the :func:`os.spawn <os.spawnl>` family"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1049
2016-10-30 09:46:26 +00:00
msgid "P_NOWAIT example::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1055
2016-10-30 09:46:26 +00:00
msgid "P_WAIT example::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1061
2016-10-30 09:46:26 +00:00
msgid "Vector example::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1067
2016-10-30 09:46:26 +00:00
msgid "Environment example::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1076
2016-10-30 09:46:26 +00:00
msgid "Replacing :func:`os.popen`, :func:`os.popen2`, :func:`os.popen3`"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1106
2016-10-30 09:46:26 +00:00
msgid "Return code handling translates as follows::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1122
2016-10-30 09:46:26 +00:00
msgid "Replacing functions from the :mod:`popen2` module"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1126
2016-10-30 09:46:26 +00:00
msgid ""
"If the cmd argument to popen2 functions is a string, the command is executed "
"through /bin/sh. If it is a list, the command is directly executed."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1145
2016-10-30 09:46:26 +00:00
msgid ""
":class:`popen2.Popen3` and :class:`popen2.Popen4` basically work as :class:"
"`subprocess.Popen`, except that:"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1148
2016-10-30 09:46:26 +00:00
msgid ":class:`Popen` raises an exception if the execution fails."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1150
2016-10-30 09:46:26 +00:00
msgid "the *capturestderr* argument is replaced with the *stderr* argument."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1152
2016-10-30 09:46:26 +00:00
msgid "``stdin=PIPE`` and ``stdout=PIPE`` must be specified."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1154
2016-10-30 09:46:26 +00:00
msgid ""
"popen2 closes all file descriptors by default, but you have to specify "
"``close_fds=True`` with :class:`Popen` to guarantee this behavior on all "
"platforms or past Python versions."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1160
2016-10-30 09:46:26 +00:00
msgid "Legacy Shell Invocation Functions"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1162
2016-10-30 09:46:26 +00:00
msgid ""
"This module also provides the following legacy functions from the 2.x "
"``commands`` module. These operations implicitly invoke the system shell and "
"none of the guarantees described above regarding security and exception "
"handling consistency are valid for these functions."
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1169
2017-09-12 11:40:22 +00:00
msgid "Return ``(exitcode, output)`` of executing *cmd* in a shell."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1171
2016-10-30 09:46:26 +00:00
msgid ""
"Execute the string *cmd* in a shell with :meth:`Popen.check_output` and "
2017-09-12 11:40:22 +00:00
"return a 2-tuple ``(exitcode, output)``. The locale encoding is used; see "
"the notes on :ref:`frequently-used-arguments` for more details."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1175
2016-10-30 09:46:26 +00:00
msgid ""
2017-09-12 11:40:22 +00:00
"A trailing newline is stripped from the output. The exit code for the "
"command can be interpreted as the return code of subprocess. Example::"
2016-10-30 09:46:26 +00:00
msgstr ""
2017-09-12 11:40:22 +00:00
#: ../Doc/library/subprocess.rst:1188 ../Doc/library/subprocess.rst:1207
2016-10-30 09:46:26 +00:00
msgid "Availability: POSIX & Windows"
msgstr ""
2017-09-12 11:40:22 +00:00
#: ../Doc/library/subprocess.rst:1190
msgid "Windows support was added."
msgstr ""
#: ../Doc/library/subprocess.rst:1193
msgid ""
"The function now returns (exitcode, output) instead of (status, output) as "
"it did in Python 3.3.3 and earlier. See :func:`WEXITSTATUS`."
2016-10-30 09:46:26 +00:00
msgstr ""
2017-09-12 11:40:22 +00:00
#: ../Doc/library/subprocess.rst:1199
2016-10-30 09:46:26 +00:00
msgid "Return output (stdout and stderr) of executing *cmd* in a shell."
msgstr ""
2017-09-12 11:40:22 +00:00
#: ../Doc/library/subprocess.rst:1201
2016-10-30 09:46:26 +00:00
msgid ""
"Like :func:`getstatusoutput`, except the exit status is ignored and the "
"return value is a string containing the command's output. Example::"
msgstr ""
2017-04-02 20:14:06 +00:00
#: ../Doc/library/subprocess.rst:1209
2017-09-12 11:40:22 +00:00
msgid "Windows support added"
msgstr ""
#: ../Doc/library/subprocess.rst:1214
2016-10-30 09:46:26 +00:00
msgid "Notes"
msgstr "Notes"
2017-09-12 11:40:22 +00:00
#: ../Doc/library/subprocess.rst:1219
2016-10-30 09:46:26 +00:00
msgid "Converting an argument sequence to a string on Windows"
msgstr ""
2017-09-12 11:40:22 +00:00
#: ../Doc/library/subprocess.rst:1221
2016-10-30 09:46:26 +00:00
msgid ""
"On Windows, an *args* sequence is converted to a string that can be parsed "
"using the following rules (which correspond to the rules used by the MS C "
"runtime):"
msgstr ""
2017-09-12 11:40:22 +00:00
#: ../Doc/library/subprocess.rst:1225
2016-10-30 09:46:26 +00:00
msgid ""
"Arguments are delimited by white space, which is either a space or a tab."
msgstr ""
2017-09-12 11:40:22 +00:00
#: ../Doc/library/subprocess.rst:1228
2016-10-30 09:46:26 +00:00
msgid ""
"A string surrounded by double quotation marks is interpreted as a single "
"argument, regardless of white space contained within. A quoted string can "
"be embedded in an argument."
msgstr ""
2017-09-12 11:40:22 +00:00
#: ../Doc/library/subprocess.rst:1233
2016-10-30 09:46:26 +00:00
msgid ""
"A double quotation mark preceded by a backslash is interpreted as a literal "
"double quotation mark."
msgstr ""
2017-09-12 11:40:22 +00:00
#: ../Doc/library/subprocess.rst:1236
2016-10-30 09:46:26 +00:00
msgid ""
"Backslashes are interpreted literally, unless they immediately precede a "
"double quotation mark."
msgstr ""
2017-09-12 11:40:22 +00:00
#: ../Doc/library/subprocess.rst:1239
2016-10-30 09:46:26 +00:00
msgid ""
"If backslashes immediately precede a double quotation mark, every pair of "
"backslashes is interpreted as a literal backslash. If the number of "
"backslashes is odd, the last backslash escapes the next double quotation "
"mark as described in rule 3."
msgstr ""
2017-09-12 11:40:22 +00:00
#: ../Doc/library/subprocess.rst:1248
2016-10-30 09:46:26 +00:00
msgid ":mod:`shlex`"
msgstr ""
2017-09-12 11:40:22 +00:00
#: ../Doc/library/subprocess.rst:1249
2016-10-30 09:46:26 +00:00
msgid "Module which provides function to parse and escape command lines."
msgstr ""