# Copyright (C) 2001-2018, Python Software Foundation # For licence information, see README file. # msgid "" msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-01-15 22:33+0100\n" "PO-Revision-Date: 2019-02-03 11:53+0100\n" "Last-Translator: Julien Palard \n" "Language-Team: FRENCH \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Poedit 1.8.11\n" #: library/selectors.rst:2 msgid ":mod:`selectors` --- High-level I/O multiplexing" msgstr "" #: library/selectors.rst:9 #, fuzzy msgid "**Source code:** :source:`Lib/selectors.py`" msgstr "**Code source :** :source:`Lib/secrets.py`" #: library/selectors.rst:14 msgid "Introduction" msgstr "Introduction" #: library/selectors.rst:16 msgid "" "This module allows high-level and efficient I/O multiplexing, built upon " "the :mod:`select` module primitives. Users are encouraged to use this module " "instead, unless they want precise control over the OS-level primitives used." msgstr "" #: library/selectors.rst:20 msgid "" "It defines a :class:`BaseSelector` abstract base class, along with several " "concrete implementations (:class:`KqueueSelector`, :class:" "`EpollSelector`...), that can be used to wait for I/O readiness notification " "on multiple file objects. In the following, \"file object\" refers to any " "object with a :meth:`fileno()` method, or a raw file descriptor. See :term:" "`file object`." msgstr "" #: library/selectors.rst:26 msgid "" ":class:`DefaultSelector` is an alias to the most efficient implementation " "available on the current platform: this should be the default choice for " "most users." msgstr "" #: library/selectors.rst:31 msgid "" "The type of file objects supported depends on the platform: on Windows, " "sockets are supported, but not pipes, whereas on Unix, both are supported " "(some other types may be supported as well, such as fifos or special file " "devices)." msgstr "" #: library/selectors.rst:38 msgid ":mod:`select`" msgstr ":mod:`select`" #: library/selectors.rst:39 msgid "Low-level I/O multiplexing module." msgstr "" #: includes/wasm-notavail.rst:None msgid ":ref:`Availability `: not Emscripten, not WASI." msgstr "" #: includes/wasm-notavail.rst:5 msgid "" "This module does not work or is not available on WebAssembly platforms " "``wasm32-emscripten`` and ``wasm32-wasi``. See :ref:`wasm-availability` for " "more information." msgstr "" #: library/selectors.rst:44 msgid "Classes" msgstr "Classes" #: library/selectors.rst:46 msgid "Classes hierarchy::" msgstr "" #: library/selectors.rst:56 msgid "" "In the following, *events* is a bitwise mask indicating which I/O events " "should be waited for on a given file object. It can be a combination of the " "modules constants below:" msgstr "" #: library/selectors.rst:61 msgid "Constant" msgstr "Constante" #: library/selectors.rst:61 msgid "Meaning" msgstr "Signification" #: library/selectors.rst:63 msgid ":const:`EVENT_READ`" msgstr ":const:`EVENT_READ`" #: library/selectors.rst:63 msgid "Available for read" msgstr "" #: library/selectors.rst:65 msgid ":const:`EVENT_WRITE`" msgstr ":const:`EVENT_WRITE`" #: library/selectors.rst:65 msgid "Available for write" msgstr "" #: library/selectors.rst:71 msgid "" "A :class:`SelectorKey` is a :class:`~collections.namedtuple` used to " "associate a file object to its underlying file descriptor, selected event " "mask and attached data. It is returned by several :class:`BaseSelector` " "methods." msgstr "" #: library/selectors.rst:78 msgid "File object registered." msgstr "" #: library/selectors.rst:82 msgid "Underlying file descriptor." msgstr "" #: library/selectors.rst:86 msgid "Events that must be waited for on this file object." msgstr "" #: library/selectors.rst:90 msgid "" "Optional opaque data associated to this file object: for example, this could " "be used to store a per-client session ID." msgstr "" #: library/selectors.rst:96 msgid "" "A :class:`BaseSelector` is used to wait for I/O event readiness on multiple " "file objects. It supports file stream registration, unregistration, and a " "method to wait for I/O events on those streams, with an optional timeout. " "It's an abstract base class, so cannot be instantiated. Use :class:" "`DefaultSelector` instead, or one of :class:`SelectSelector`, :class:" "`KqueueSelector` etc. if you want to specifically use an implementation, and " "your platform supports it. :class:`BaseSelector` and its concrete " "implementations support the :term:`context manager` protocol." msgstr "" #: library/selectors.rst:108 msgid "Register a file object for selection, monitoring it for I/O events." msgstr "" #: library/selectors.rst:110 msgid "" "*fileobj* is the file object to monitor. It may either be an integer file " "descriptor or an object with a ``fileno()`` method. *events* is a bitwise " "mask of events to monitor. *data* is an opaque object." msgstr "" #: library/selectors.rst:115 msgid "" "This returns a new :class:`SelectorKey` instance, or raises a :exc:" "`ValueError` in case of invalid event mask or file descriptor, or :exc:" "`KeyError` if the file object is already registered." msgstr "" #: library/selectors.rst:121 msgid "" "Unregister a file object from selection, removing it from monitoring. A file " "object shall be unregistered prior to being closed." msgstr "" #: library/selectors.rst:124 msgid "*fileobj* must be a file object previously registered." msgstr "" #: library/selectors.rst:126 msgid "" "This returns the associated :class:`SelectorKey` instance, or raises a :exc:" "`KeyError` if *fileobj* is not registered. It will raise :exc:`ValueError` " "if *fileobj* is invalid (e.g. it has no ``fileno()`` method or its " "``fileno()`` method has an invalid return value)." msgstr "" #: library/selectors.rst:133 msgid "Change a registered file object's monitored events or attached data." msgstr "" #: library/selectors.rst:135 msgid "" "This is equivalent to :meth:`BaseSelector.unregister(fileobj)` followed by :" "meth:`BaseSelector.register(fileobj, events, data)`, except that it can be " "implemented more efficiently." msgstr "" #: library/selectors.rst:139 msgid "" "This returns a new :class:`SelectorKey` instance, or raises a :exc:" "`ValueError` in case of invalid event mask or file descriptor, or :exc:" "`KeyError` if the file object is not registered." msgstr "" #: library/selectors.rst:145 msgid "" "Wait until some registered file objects become ready, or the timeout expires." msgstr "" #: library/selectors.rst:148 msgid "" "If ``timeout > 0``, this specifies the maximum wait time, in seconds. If " "``timeout <= 0``, the call won't block, and will report the currently ready " "file objects. If *timeout* is ``None``, the call will block until a " "monitored file object becomes ready." msgstr "" #: library/selectors.rst:154 msgid "" "This returns a list of ``(key, events)`` tuples, one for each ready file " "object." msgstr "" #: library/selectors.rst:157 msgid "" "*key* is the :class:`SelectorKey` instance corresponding to a ready file " "object. *events* is a bitmask of events ready on this file object." msgstr "" #: library/selectors.rst:162 msgid "" "This method can return before any file object becomes ready or the timeout " "has elapsed if the current process receives a signal: in this case, an empty " "list will be returned." msgstr "" #: library/selectors.rst:166 msgid "" "The selector is now retried with a recomputed timeout when interrupted by a " "signal if the signal handler did not raise an exception (see :pep:`475` for " "the rationale), instead of returning an empty list of events before the " "timeout." msgstr "" #: library/selectors.rst:174 msgid "Close the selector." msgstr "" #: library/selectors.rst:176 msgid "" "This must be called to make sure that any underlying resource is freed. The " "selector shall not be used once it has been closed." msgstr "" #: library/selectors.rst:181 msgid "Return the key associated with a registered file object." msgstr "" #: library/selectors.rst:183 msgid "" "This returns the :class:`SelectorKey` instance associated to this file " "object, or raises :exc:`KeyError` if the file object is not registered." msgstr "" #: library/selectors.rst:188 msgid "Return a mapping of file objects to selector keys." msgstr "" #: library/selectors.rst:190 msgid "" "This returns a :class:`~collections.abc.Mapping` instance mapping registered " "file objects to their associated :class:`SelectorKey` instance." msgstr "" #: library/selectors.rst:197 msgid "" "The default selector class, using the most efficient implementation " "available on the current platform. This should be the default choice for " "most users." msgstr "" #: library/selectors.rst:204 msgid ":func:`select.select`-based selector." msgstr "" #: library/selectors.rst:209 msgid ":func:`select.poll`-based selector." msgstr "" #: library/selectors.rst:214 msgid ":func:`select.epoll`-based selector." msgstr "" #: library/selectors.rst:218 msgid "" "This returns the file descriptor used by the underlying :func:`select.epoll` " "object." msgstr "" #: library/selectors.rst:223 msgid ":func:`select.devpoll`-based selector." msgstr "" #: library/selectors.rst:227 msgid "" "This returns the file descriptor used by the underlying :func:`select." "devpoll` object." msgstr "" #: library/selectors.rst:234 msgid ":func:`select.kqueue`-based selector." msgstr "" #: library/selectors.rst:238 msgid "" "This returns the file descriptor used by the underlying :func:`select." "kqueue` object." msgstr "" #: library/selectors.rst:243 msgid "Examples" msgstr "Exemples" #: library/selectors.rst:245 msgid "Here is a simple echo server implementation::" msgstr ""