# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-05-22 23:13+0200\n" "PO-Revision-Date: 2022-05-23 00:50+0200\n" "Last-Translator: FULL NAME \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" #: library/importlib.resources.rst:2 msgid ":mod:`importlib.resources` -- Resources" msgstr "" #: library/importlib.resources.rst:7 msgid "**Source code:** :source:`Lib/importlib/resources.py`" msgstr "" #: library/importlib.resources.rst:13 msgid "" "This module leverages Python's import system to provide access to " "*resources* within *packages*. If you can import a package, you can access " "resources within that package. Resources can be opened or read, in either " "binary or text mode." msgstr "" #: library/importlib.resources.rst:18 msgid "" "Resources are roughly akin to files inside directories, though it's " "important to keep in mind that this is just a metaphor. Resources and " "packages **do not** have to exist as physical files and directories on the " "file system." msgstr "" #: library/importlib.resources.rst:24 msgid "" "This module provides functionality similar to `pkg_resources `_ `Basic Resource " "Access `_ without the performance overhead of that package. This " "makes reading resources included in packages easier, with more stable and " "consistent semantics." msgstr "" #: library/importlib.resources.rst:32 msgid "" "The standalone backport of this module provides more information on `using " "importlib.resources `_ and `migrating from pkg_resources to importlib.resources " "`_ and " "`migrating legacy usage `_." msgstr "" #: library/importlib.resources.rst:40 msgid "" "Loaders that wish to support resource reading should implement a " "``get_resource_reader(fullname)`` method as specified by :class:`importlib." "abc.ResourceReader`." msgstr "" #: library/importlib.resources.rst:44 msgid "The following types are defined." msgstr "" #: library/importlib.resources.rst:48 msgid "" "The ``Package`` type is defined as ``Union[str, ModuleType]``. This means " "that where the function describes accepting a ``Package``, you can pass in " "either a string or a module. Module objects must have a resolvable " "``__spec__.submodule_search_locations`` that is not ``None``." msgstr "" #: library/importlib.resources.rst:55 msgid "" "This type describes the resource names passed into the various functions in " "this package. This is defined as ``Union[str, os.PathLike]``." msgstr "" #: library/importlib.resources.rst:59 msgid "The following functions are available." msgstr "" #: library/importlib.resources.rst:64 msgid "" "Returns an :class:`importlib.resources.abc.Traversable` object representing " "the resource container for the package (think directory) and its resources " "(think files). A Traversable may contain other containers (think " "subdirectories)." msgstr "" #: library/importlib.resources.rst:69 library/importlib.resources.rst:182 msgid "" "*package* is either a name or a module object which conforms to the " "``Package`` requirements." msgstr "" #: library/importlib.resources.rst:76 msgid "" "Given a :class:`importlib.resources.abc.Traversable` object representing a " "file, typically from :func:`importlib.resources.files`, return a context " "manager for use in a :keyword:`with` statement. The context manager provides " "a :class:`pathlib.Path` object." msgstr "" #: library/importlib.resources.rst:81 msgid "" "Exiting the context manager cleans up any temporary file created when the " "resource was extracted from e.g. a zip file." msgstr "" #: library/importlib.resources.rst:84 msgid "" "Use ``as_file`` when the Traversable methods (``read_text``, etc) are " "insufficient and an actual file on the file system is required." msgstr "" #: library/importlib.resources.rst:92 msgid "Open for binary reading the *resource* within *package*." msgstr "" #: library/importlib.resources.rst:94 msgid "" "*package* is either a name or a module object which conforms to the " "``Package`` requirements. *resource* is the name of the resource to open " "within *package*; it may not contain path separators and it may not have sub-" "resources (i.e. it cannot be a directory). This function returns a ``typing." "BinaryIO`` instance, a binary I/O stream open for reading." msgstr "" #: library/importlib.resources.rst:105 msgid "" "Open for text reading the *resource* within *package*. By default, the " "resource is opened for reading as UTF-8." msgstr "" #: library/importlib.resources.rst:108 msgid "" "*package* is either a name or a module object which conforms to the " "``Package`` requirements. *resource* is the name of the resource to open " "within *package*; it may not contain path separators and it may not have sub-" "resources (i.e. it cannot be a directory). *encoding* and *errors* have the " "same meaning as with built-in :func:`open`." msgstr "" #: library/importlib.resources.rst:114 msgid "" "This function returns a ``typing.TextIO`` instance, a text I/O stream open " "for reading." msgstr "" #: library/importlib.resources.rst:122 msgid "" "Read and return the contents of the *resource* within *package* as ``bytes``." msgstr "" #: library/importlib.resources.rst:125 msgid "" "*package* is either a name or a module object which conforms to the " "``Package`` requirements. *resource* is the name of the resource to open " "within *package*; it may not contain path separators and it may not have sub-" "resources (i.e. it cannot be a directory). This function returns the " "contents of the resource as :class:`bytes`." msgstr "" #: library/importlib.resources.rst:136 msgid "" "Read and return the contents of *resource* within *package* as a ``str``. By " "default, the contents are read as strict UTF-8." msgstr "" #: library/importlib.resources.rst:139 msgid "" "*package* is either a name or a module object which conforms to the " "``Package`` requirements. *resource* is the name of the resource to open " "within *package*; it may not contain path separators and it may not have sub-" "resources (i.e. it cannot be a directory). *encoding* and *errors* have the " "same meaning as with built-in :func:`open`. This function returns the " "contents of the resource as :class:`str`." msgstr "" #: library/importlib.resources.rst:151 msgid "" "Return the path to the *resource* as an actual file system path. This " "function returns a context manager for use in a :keyword:`with` statement. " "The context manager provides a :class:`pathlib.Path` object." msgstr "" #: library/importlib.resources.rst:155 msgid "" "Exiting the context manager cleans up any temporary file created when the " "resource needs to be extracted from e.g. a zip file." msgstr "" #: library/importlib.resources.rst:158 msgid "" "*package* is either a name or a module object which conforms to the " "``Package`` requirements. *resource* is the name of the resource to open " "within *package*; it may not contain path separators and it may not have sub-" "resources (i.e. it cannot be a directory)." msgstr "" #: library/importlib.resources.rst:168 msgid "" "Return ``True`` if there is a resource named *name* in the package, " "otherwise ``False``. Remember that directories are *not* resources! " "*package* is either a name or a module object which conforms to the " "``Package`` requirements." msgstr "" #: library/importlib.resources.rst:178 msgid "" "Return an iterable over the named items within the package. The iterable " "returns :class:`str` resources (e.g. files) and non-resources (e.g. " "directories). The iterable does not recurse into subdirectories." msgstr ""