python-docs-fr/library/subprocess.po
2017-09-12 13:40:22 +02:00

1348 lines
46 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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"
"POT-Creation-Date: 2017-09-12 13:37+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: fr\n"
"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 ""
#: ../Doc/library/subprocess.rst:111 ../Doc/library/subprocess.rst:745
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 "
"*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 "
"executable path is a relative path."
msgstr ""
#: ../Doc/library/subprocess.rst:474
msgid "*cwd* parameter accepts a :term:`path-like object`."
msgstr ""
#: ../Doc/library/subprocess.rst:477
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 ""
#: ../Doc/library/subprocess.rst:482
msgid "*restore_signals* was added."
msgstr ""
#: ../Doc/library/subprocess.rst:485
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 ""
#: ../Doc/library/subprocess.rst:488
msgid "*start_new_session* was added."
msgstr ""
#: ../Doc/library/subprocess.rst:491
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 ""
#: ../Doc/library/subprocess.rst:497
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 ""
#: ../Doc/library/subprocess.rst:503
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 ""
#: ../Doc/library/subprocess.rst:509
msgid "*encoding* and *errors* were added."
msgstr ""
#: ../Doc/library/subprocess.rst:512
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 ""
#: ../Doc/library/subprocess.rst:517
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 ""
#: ../Doc/library/subprocess.rst:524
msgid "Added context manager support."
msgstr ""
#: ../Doc/library/subprocess.rst:527
msgid ""
"Popen destructor now emits a :exc:`ResourceWarning` warning if the child "
"process is still running."
msgstr ""
#: ../Doc/library/subprocess.rst:533
msgid "Exceptions"
msgstr "Les exceptions"
#: ../Doc/library/subprocess.rst:535
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 ""
#: ../Doc/library/subprocess.rst:540
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 ""
#: ../Doc/library/subprocess.rst:544
msgid ""
"A :exc:`ValueError` will be raised if :class:`Popen` is called with invalid "
"arguments."
msgstr ""
#: ../Doc/library/subprocess.rst:547
msgid ""
":func:`check_call` and :func:`check_output` will raise :exc:"
"`CalledProcessError` if the called process returns a non-zero return code."
msgstr ""
#: ../Doc/library/subprocess.rst:551
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 ""
#: ../Doc/library/subprocess.rst:555
msgid ""
"Exceptions defined in this module all inherit from :exc:`SubprocessError`."
msgstr ""
#: ../Doc/library/subprocess.rst:557
msgid "The :exc:`SubprocessError` base class was added."
msgstr ""
#: ../Doc/library/subprocess.rst:562
msgid "Security Considerations"
msgstr ""
#: ../Doc/library/subprocess.rst:564
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 ""
#: ../Doc/library/subprocess.rst:573
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 ""
#: ../Doc/library/subprocess.rst:579
msgid "Popen Objects"
msgstr ""
#: ../Doc/library/subprocess.rst:581
msgid "Instances of the :class:`Popen` class have the following methods:"
msgstr ""
#: ../Doc/library/subprocess.rst:586
msgid ""
"Check if child process has terminated. Set and return :attr:`~Popen."
"returncode` attribute."
msgstr ""
#: ../Doc/library/subprocess.rst:592
msgid ""
"Wait for child process to terminate. Set and return :attr:`~Popen."
"returncode` attribute."
msgstr ""
#: ../Doc/library/subprocess.rst:595
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 ""
#: ../Doc/library/subprocess.rst:601
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 ""
#: ../Doc/library/subprocess.rst:608
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 ""
#: ../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
msgid "*timeout* was added."
msgstr ""
#: ../Doc/library/subprocess.rst:617
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 ""
#: ../Doc/library/subprocess.rst:623
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 ""
#: ../Doc/library/subprocess.rst:629
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 ""
#: ../Doc/library/subprocess.rst:633
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 ""
#: ../Doc/library/subprocess.rst:638
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 ""
#: ../Doc/library/subprocess.rst:642
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 ""
#: ../Doc/library/subprocess.rst:655
msgid ""
"The data read is buffered in memory, so do not use this method if the data "
"size is large or unlimited."
msgstr ""
#: ../Doc/library/subprocess.rst:664
msgid "Sends the signal *signal* to the child."
msgstr "Envoie le signal *signal* au fils."
#: ../Doc/library/subprocess.rst:668
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 ""
#: ../Doc/library/subprocess.rst:675
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 ""
#: ../Doc/library/subprocess.rst:682
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 ""
#: ../Doc/library/subprocess.rst:686
msgid "The following attributes are also available:"
msgstr ""
#: ../Doc/library/subprocess.rst:690
msgid ""
"The *args* argument as it was passed to :class:`Popen` -- a sequence of "
"program arguments or else a single string."
msgstr ""
#: ../Doc/library/subprocess.rst:697
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 ""
#: ../Doc/library/subprocess.rst:706
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 ""
#: ../Doc/library/subprocess.rst:716
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 ""
#: ../Doc/library/subprocess.rst:725
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 ""
#: ../Doc/library/subprocess.rst:733
msgid "The process ID of the child process."
msgstr ""
#: ../Doc/library/subprocess.rst:735
msgid ""
"Note that if you set the *shell* argument to ``True``, this is the process "
"ID of the spawned shell."
msgstr ""
#: ../Doc/library/subprocess.rst:741
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 ""
#: ../Doc/library/subprocess.rst:750
msgid "Windows Popen Helpers"
msgstr ""
#: ../Doc/library/subprocess.rst:752
msgid ""
"The :class:`STARTUPINFO` class and following constants are only available on "
"Windows."
msgstr ""
#: ../Doc/library/subprocess.rst:757
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 ""
#: ../Doc/library/subprocess.rst:763
msgid ""
"A bit field that determines whether certain :class:`STARTUPINFO` attributes "
"are used when the process creates a window. ::"
msgstr ""
#: ../Doc/library/subprocess.rst:771
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 ""
#: ../Doc/library/subprocess.rst:778
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 ""
#: ../Doc/library/subprocess.rst:785
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 ""
#: ../Doc/library/subprocess.rst:791
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 ""
#: ../Doc/library/subprocess.rst:798
msgid ""
":data:`SW_HIDE` is provided for this attribute. It is used when :class:"
"`Popen` is called with ``shell=True``."
msgstr ""
#: ../Doc/library/subprocess.rst:803
msgid "Constants"
msgstr "Constantes"
#: ../Doc/library/subprocess.rst:805
msgid "The :mod:`subprocess` module exposes the following constants."
msgstr ""
#: ../Doc/library/subprocess.rst:809
msgid ""
"The standard input device. Initially, this is the console input buffer, "
"``CONIN$``."
msgstr ""
#: ../Doc/library/subprocess.rst:814
msgid ""
"The standard output device. Initially, this is the active console screen "
"buffer, ``CONOUT$``."
msgstr ""
#: ../Doc/library/subprocess.rst:819
msgid ""
"The standard error device. Initially, this is the active console screen "
"buffer, ``CONOUT$``."
msgstr ""
#: ../Doc/library/subprocess.rst:824
msgid "Hides the window. Another window will be activated."
msgstr ""
#: ../Doc/library/subprocess.rst:828
msgid ""
"Specifies that the :attr:`STARTUPINFO.hStdInput`, :attr:`STARTUPINFO."
"hStdOutput`, and :attr:`STARTUPINFO.hStdError` attributes contain additional "
"information."
msgstr ""
#: ../Doc/library/subprocess.rst:834
msgid ""
"Specifies that the :attr:`STARTUPINFO.wShowWindow` attribute contains "
"additional information."
msgstr ""
#: ../Doc/library/subprocess.rst:839
msgid ""
"The new process has a new console, instead of inheriting its parent's "
"console (the default)."
msgstr ""
#: ../Doc/library/subprocess.rst:844
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 ""
#: ../Doc/library/subprocess.rst:848
msgid "This flag is ignored if :data:`CREATE_NEW_CONSOLE` is specified."
msgstr ""
#: ../Doc/library/subprocess.rst:853
msgid "Older high-level API"
msgstr ""
#: ../Doc/library/subprocess.rst:855
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 ""
#: ../Doc/library/subprocess.rst:861
msgid ""
"Run the command described by *args*. Wait for command to complete, then "
"return the :attr:`~Popen.returncode` attribute."
msgstr ""
#: ../Doc/library/subprocess.rst:864 ../Doc/library/subprocess.rst:892
#: ../Doc/library/subprocess.rst:925
msgid "This is equivalent to::"
msgstr "Cest équivalent à ::"
#: ../Doc/library/subprocess.rst:868
msgid "(except that the *input* and *check* parameters are not supported)"
msgstr ""
#: ../Doc/library/subprocess.rst:870 ../Doc/library/subprocess.rst:898
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 ""
#: ../Doc/library/subprocess.rst:877 ../Doc/library/subprocess.rst:905
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 ""
#: ../Doc/library/subprocess.rst:887
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 ""
#: ../Doc/library/subprocess.rst:896
msgid "(except that the *input* parameter is not supported)"
msgstr ""
#: ../Doc/library/subprocess.rst:918
msgid "Run command with arguments and return its output."
msgstr ""
#: ../Doc/library/subprocess.rst:920
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 ""
#: ../Doc/library/subprocess.rst:929
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 ""
#: ../Doc/library/subprocess.rst:935
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 ""
#: ../Doc/library/subprocess.rst:939
msgid ""
"This behaviour may be overridden by setting *universal_newlines* to ``True`` "
"as described above in :ref:`frequently-used-arguments`."
msgstr ""
#: ../Doc/library/subprocess.rst:942
msgid ""
"To also capture standard error in the result, use ``stderr=subprocess."
"STDOUT``::"
msgstr ""
#: ../Doc/library/subprocess.rst:956
msgid "Support for the *input* keyword argument was added."
msgstr ""
#: ../Doc/library/subprocess.rst:962
msgid "Replacing Older Functions with the :mod:`subprocess` Module"
msgstr ""
#: ../Doc/library/subprocess.rst:964
msgid ""
"In this section, \"a becomes b\" means that b can be used as a replacement "
"for a."
msgstr ""
#: ../Doc/library/subprocess.rst:968
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 ""
#: ../Doc/library/subprocess.rst:972
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 ""
#: ../Doc/library/subprocess.rst:977
msgid ""
"In the following examples, we assume that the relevant functions have "
"already been imported from the :mod:`subprocess` module."
msgstr ""
#: ../Doc/library/subprocess.rst:982
msgid "Replacing /bin/sh shell backquote"
msgstr ""
#: ../Doc/library/subprocess.rst:988 ../Doc/library/subprocess.rst:999
#: ../Doc/library/subprocess.rst:1016
msgid "becomes::"
msgstr ""
#: ../Doc/library/subprocess.rst:993
msgid "Replacing shell pipeline"
msgstr ""
#: ../Doc/library/subprocess.rst:1006
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 ""
#: ../Doc/library/subprocess.rst:1009
msgid ""
"Alternatively, for trusted input, the shell's own pipeline support may still "
"be used directly:"
msgstr ""
#: ../Doc/library/subprocess.rst:1022
msgid "Replacing :func:`os.system`"
msgstr ""
#: ../Doc/library/subprocess.rst:1030
msgid "Notes:"
msgstr "Notes : "
#: ../Doc/library/subprocess.rst:1032
msgid "Calling the program through the shell is usually not required."
msgstr ""
#: ../Doc/library/subprocess.rst:1034
msgid "A more realistic example would look like this::"
msgstr ""
#: ../Doc/library/subprocess.rst:1047
msgid "Replacing the :func:`os.spawn <os.spawnl>` family"
msgstr ""
#: ../Doc/library/subprocess.rst:1049
msgid "P_NOWAIT example::"
msgstr ""
#: ../Doc/library/subprocess.rst:1055
msgid "P_WAIT example::"
msgstr ""
#: ../Doc/library/subprocess.rst:1061
msgid "Vector example::"
msgstr ""
#: ../Doc/library/subprocess.rst:1067
msgid "Environment example::"
msgstr ""
#: ../Doc/library/subprocess.rst:1076
msgid "Replacing :func:`os.popen`, :func:`os.popen2`, :func:`os.popen3`"
msgstr ""
#: ../Doc/library/subprocess.rst:1106
msgid "Return code handling translates as follows::"
msgstr ""
#: ../Doc/library/subprocess.rst:1122
msgid "Replacing functions from the :mod:`popen2` module"
msgstr ""
#: ../Doc/library/subprocess.rst:1126
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 ""
#: ../Doc/library/subprocess.rst:1145
msgid ""
":class:`popen2.Popen3` and :class:`popen2.Popen4` basically work as :class:"
"`subprocess.Popen`, except that:"
msgstr ""
#: ../Doc/library/subprocess.rst:1148
msgid ":class:`Popen` raises an exception if the execution fails."
msgstr ""
#: ../Doc/library/subprocess.rst:1150
msgid "the *capturestderr* argument is replaced with the *stderr* argument."
msgstr ""
#: ../Doc/library/subprocess.rst:1152
msgid "``stdin=PIPE`` and ``stdout=PIPE`` must be specified."
msgstr ""
#: ../Doc/library/subprocess.rst:1154
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 ""
#: ../Doc/library/subprocess.rst:1160
msgid "Legacy Shell Invocation Functions"
msgstr ""
#: ../Doc/library/subprocess.rst:1162
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 ""
#: ../Doc/library/subprocess.rst:1169
msgid "Return ``(exitcode, output)`` of executing *cmd* in a shell."
msgstr ""
#: ../Doc/library/subprocess.rst:1171
msgid ""
"Execute the string *cmd* in a shell with :meth:`Popen.check_output` and "
"return a 2-tuple ``(exitcode, output)``. The locale encoding is used; see "
"the notes on :ref:`frequently-used-arguments` for more details."
msgstr ""
#: ../Doc/library/subprocess.rst:1175
msgid ""
"A trailing newline is stripped from the output. The exit code for the "
"command can be interpreted as the return code of subprocess. Example::"
msgstr ""
#: ../Doc/library/subprocess.rst:1188 ../Doc/library/subprocess.rst:1207
msgid "Availability: POSIX & Windows"
msgstr ""
#: ../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`."
msgstr ""
#: ../Doc/library/subprocess.rst:1199
msgid "Return output (stdout and stderr) of executing *cmd* in a shell."
msgstr ""
#: ../Doc/library/subprocess.rst:1201
msgid ""
"Like :func:`getstatusoutput`, except the exit status is ignored and the "
"return value is a string containing the command's output. Example::"
msgstr ""
#: ../Doc/library/subprocess.rst:1209
msgid "Windows support added"
msgstr ""
#: ../Doc/library/subprocess.rst:1214
msgid "Notes"
msgstr "Notes"
#: ../Doc/library/subprocess.rst:1219
msgid "Converting an argument sequence to a string on Windows"
msgstr ""
#: ../Doc/library/subprocess.rst:1221
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 ""
#: ../Doc/library/subprocess.rst:1225
msgid ""
"Arguments are delimited by white space, which is either a space or a tab."
msgstr ""
#: ../Doc/library/subprocess.rst:1228
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 ""
#: ../Doc/library/subprocess.rst:1233
msgid ""
"A double quotation mark preceded by a backslash is interpreted as a literal "
"double quotation mark."
msgstr ""
#: ../Doc/library/subprocess.rst:1236
msgid ""
"Backslashes are interpreted literally, unless they immediately precede a "
"double quotation mark."
msgstr ""
#: ../Doc/library/subprocess.rst:1239
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 ""
#: ../Doc/library/subprocess.rst:1248
msgid ":mod:`shlex`"
msgstr ""
#: ../Doc/library/subprocess.rst:1249
msgid "Module which provides function to parse and escape command lines."
msgstr ""