python-docs-fr/library/shelve.po

310 lines
12 KiB
Plaintext

# SOME DESCRIPTIVE TITLE.
# Copyright (C) 1990-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 2.7\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-10-30 10:44+0100\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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../Doc/library/shelve.rst:2
msgid ":mod:`shelve` --- Python object persistence"
msgstr ":mod:`shelve` --- Objet Python persistant"
#: ../Doc/library/shelve.rst:10
msgid "**Source code:** :source:`Lib/shelve.py`"
msgstr "**Code source :** :source:`Lib/shelve.py`"
#: ../Doc/library/shelve.rst:14
msgid ""
"A \"shelf\" is a persistent, dictionary-like object. The difference with "
"\"dbm\" databases is that the values (not the keys!) in a shelf can be "
"essentially arbitrary Python objects --- anything that the :mod:`pickle` "
"module can handle. This includes most class instances, recursive data types, "
"and objects containing lots of shared sub-objects. The keys are ordinary "
"strings."
msgstr ""
"Un *shelf* est un objet persistant, dictionnaire-compatible. La différence "
"avec les bases de données *dbm* est que les valeurs (pas les clés !) dans un "
"*shelf* peuvent être des objets Python arbitraires --- n'importe quoi que le "
"module :mod:`pickle` peut gérer. Cela inclut la plupart des instances de "
"classe, des types de données récursives, et les objets contenant beaucoup de "
"sous-objets partagés. Les clés sont des chaînes de caractères ordinaires."
#: ../Doc/library/shelve.rst:23
msgid ""
"Open a persistent dictionary. The filename specified is the base filename "
"for the underlying database. As a side-effect, an extension may be added to "
"the filename and more than one file may be created. By default, the "
"underlying database file is opened for reading and writing. The optional "
"*flag* parameter has the same interpretation as the *flag* parameter of :"
"func:`anydbm.open`."
msgstr ""
#: ../Doc/library/shelve.rst:29
msgid ""
"By default, version 0 pickles are used to serialize values. The version of "
"the pickle protocol can be specified with the *protocol* parameter."
msgstr ""
#: ../Doc/library/shelve.rst:32 ../Doc/library/shelve.rst:118
msgid "The *protocol* parameter was added."
msgstr ""
#: ../Doc/library/shelve.rst:35
msgid ""
"Because of Python semantics, a shelf cannot know when a mutable persistent-"
"dictionary entry is modified. By default modified objects are written "
"*only* when assigned to the shelf (see :ref:`shelve-example`). If the "
"optional *writeback* parameter is set to ``True``, all entries accessed are "
"also cached in memory, and written back on :meth:`~Shelf.sync` and :meth:"
"`~Shelf.close`; this can make it handier to mutate mutable entries in the "
"persistent dictionary, but, if many entries are accessed, it can consume "
"vast amounts of memory for the cache, and it can make the close operation "
"very slow since all accessed entries are written back (there is no way to "
"determine which accessed entries are mutable, nor which ones were actually "
"mutated)."
msgstr ""
"À cause de la sémantique Python, un *shelf* ne peut pas savoir lorsqu'une "
"entrée modifiable de dictionnaire persistant est modifiée. Par défaut les "
"objets modifiés sont écrits *seulement* lorsqu'ils sont assignés à une "
"*shelf* (voir :ref:`shelve-example`). Si le paramètre optionnel *writeback* "
"est mis à ``True``, toutes les entrées déjà accédées sont aussi mises en "
"cache en mémoire, et ré-écrites sur :meth:`~Shelf.sync` et :meth:`~Shelf."
"close` ; cela peut faciliter la modification des entrées modifiables dans le "
"dictionnaire persistant, mais, si vous accédez à beaucoup d'entrées, cela "
"peut consommer beaucoup de mémoire cache, et cela peut rendre l'opération de "
"fermeture très lente puisque toutes les entrées déjà accédées sont ré-"
"écrites (il n'y a aucun moyen de savoir quelles entrées déjà accédées sont "
"mutables, ni lesquelles ont été vraiment modifiées)."
#: ../Doc/library/shelve.rst:47
msgid ""
"Like file objects, shelve objects should be closed explicitly to ensure that "
"the persistent data is flushed to disk."
msgstr ""
#: ../Doc/library/shelve.rst:52
msgid ""
"Because the :mod:`shelve` module is backed by :mod:`pickle`, it is insecure "
"to load a shelf from an untrusted source. Like with pickle, loading a shelf "
"can execute arbitrary code."
msgstr ""
"Puisque le module :mod:`shelve` utilise en arrière plan :mod:`pickle`, il "
"n'est pas sûr de charger un *shelf* depuis une source non fiable. Comme avec "
"*pickle*, charger un *shelf* peut exécuter du code arbitraire."
#: ../Doc/library/shelve.rst:56
msgid ""
"Shelf objects support most of the methods supported by dictionaries. This "
"eases the transition from dictionary based scripts to those requiring "
"persistent storage."
msgstr ""
#: ../Doc/library/shelve.rst:60
msgid ""
"Note, the Python 3 transition methods (:meth:`~dict.viewkeys`, :meth:`~dict."
"viewvalues`, and :meth:`~dict.viewitems`) are not supported."
msgstr ""
#: ../Doc/library/shelve.rst:63
msgid "Two additional methods are supported:"
msgstr "Deux méthodes supplémentaires sont supportées :"
#: ../Doc/library/shelve.rst:67
msgid ""
"Write back all entries in the cache if the shelf was opened with *writeback* "
"set to :const:`True`. Also empty the cache and synchronize the persistent "
"dictionary on disk, if feasible. This is called automatically when the "
"shelf is closed with :meth:`close`."
msgstr ""
"Réécrit toutes les entrées dans le cache si le *shelf* a été ouvert avec "
"*writeback* passé à :const:`True`. Vide le cache et synchronise le "
"dictionnaire persistant sur le disque, si faisable. Elle est appelée "
"automatiquement quand le *shelf* est fermé avec :meth:`close`."
#: ../Doc/library/shelve.rst:74
msgid ""
"Synchronize and close the persistent *dict* object. Operations on a closed "
"shelf will fail with a :exc:`ValueError`."
msgstr ""
"Synchronise et ferme l'objet *dict* persistant. Les opérations sur un "
"*shelf* fermé échouent avec une :exc:`ValueError`."
#: ../Doc/library/shelve.rst:80
msgid ""
"`Persistent dictionary recipe <https://code.activestate.com/recipes/576642/"
">`_ with widely supported storage formats and having the speed of native "
"dictionaries."
msgstr ""
"`Recette pour un dictionnaire persistant <https://code.activestate.com/"
"recipes/576642/>`_ avec un large panel de formats de stockage et ayant la "
"vitesse des dictionnaires natifs."
#: ../Doc/library/shelve.rst:86
msgid "Restrictions"
msgstr "Limites"
#: ../Doc/library/shelve.rst:93
msgid ""
"The choice of which database package will be used (such as :mod:`dbm`, :mod:"
"`gdbm` or :mod:`bsddb`) depends on which interface is available. Therefore "
"it is not safe to open the database directly using :mod:`dbm`. The database "
"is also (unfortunately) subject to the limitations of :mod:`dbm`, if it is "
"used --- this means that (the pickled representation of) the objects stored "
"in the database should be fairly small, and in rare cases key collisions may "
"cause the database to refuse updates."
msgstr ""
#: ../Doc/library/shelve.rst:101
msgid ""
"The :mod:`shelve` module does not support *concurrent* read/write access to "
"shelved objects. (Multiple simultaneous read accesses are safe.) When a "
"program has a shelf open for writing, no other program should have it open "
"for reading or writing. Unix file locking can be used to solve this, but "
"this differs across Unix versions and requires knowledge about the database "
"implementation used."
msgstr ""
"Le module :mod:`shelve` ne gère pas l'accès *concurrent* en lecture/écriture "
"sur les objets stockés (les accès simultanés en lecture sont sûrs). "
"Lorsqu'un programme a un *shelf* ouvert en écriture, aucun autre programme "
"ne doit l'avoir ouvert en écriture ou lecture. Le verrouillage des fichier "
"Unix peut être utilisé pour résoudre ce problème, mais cela dépend de la "
"version Unix et nécessite des connaissances à propos de l'implémentation de "
"la base de données utilisée."
#: ../Doc/library/shelve.rst:111
msgid ""
"A subclass of :class:`UserDict.DictMixin` which stores pickled values in the "
"*dict* object."
msgstr ""
#: ../Doc/library/shelve.rst:114
msgid ""
"By default, version 0 pickles are used to serialize values. The version of "
"the pickle protocol can be specified with the *protocol* parameter. See the :"
"mod:`pickle` documentation for a discussion of the pickle protocols."
msgstr ""
#: ../Doc/library/shelve.rst:121
msgid ""
"If the *writeback* parameter is ``True``, the object will hold a cache of "
"all entries accessed and write them back to the *dict* at sync and close "
"times. This allows natural operations on mutable entries, but can consume "
"much more memory and make sync and close take a long time."
msgstr ""
"Si le paramètre *writeback* est ``True``, l'objet garde en cache toutes les "
"entrées accédées et les écrit dans le *dict* aux moments de synchronisation "
"et de fermeture. Cela permet des opérations naturelles sur les entrées "
"modifiables, mais peut consommer beaucoup plus de mémoire et rendre les "
"temps de synchronisation et de fermeture très longs."
#: ../Doc/library/shelve.rst:129
msgid ""
"A subclass of :class:`Shelf` which exposes :meth:`first`, :meth:`!next`, :"
"meth:`previous`, :meth:`last` and :meth:`set_location` which are available "
"in the :mod:`bsddb` module but not in other database modules. The *dict* "
"object passed to the constructor must support those methods. This is "
"generally accomplished by calling one of :func:`bsddb.hashopen`, :func:"
"`bsddb.btopen` or :func:`bsddb.rnopen`. The optional *protocol* and "
"*writeback* parameters have the same interpretation as for the :class:"
"`Shelf` class."
msgstr ""
#: ../Doc/library/shelve.rst:140
msgid ""
"A subclass of :class:`Shelf` which accepts a *filename* instead of a dict-"
"like object. The underlying file will be opened using :func:`anydbm.open`. "
"By default, the file will be created and opened for both read and write. "
"The optional *flag* parameter has the same interpretation as for the :func:`."
"open` function. The optional *protocol* and *writeback* parameters have the "
"same interpretation as for the :class:`Shelf` class."
msgstr ""
#: ../Doc/library/shelve.rst:151
msgid "Example"
msgstr "Exemple"
#: ../Doc/library/shelve.rst:153
msgid ""
"To summarize the interface (``key`` is a string, ``data`` is an arbitrary "
"object)::"
msgstr ""
"Pour résumer l'interface (``key`` est une chaîne de caractère, ``data`` est "
"un objet arbitraire) ::"
#: ../Doc/library/shelve.rst:189
msgid "Module :mod:`anydbm`"
msgstr ""
#: ../Doc/library/shelve.rst:189
msgid "Generic interface to ``dbm``\\ -style databases."
msgstr ""
#: ../Doc/library/shelve.rst:192
msgid "Module :mod:`bsddb`"
msgstr ""
#: ../Doc/library/shelve.rst:192
msgid "BSD ``db`` database interface."
msgstr ""
#: ../Doc/library/shelve.rst:196
msgid "Module :mod:`dbhash`"
msgstr ""
#: ../Doc/library/shelve.rst:195
msgid ""
"Thin layer around the :mod:`bsddb` which provides an :func:`~dbhash.open` "
"function like the other database modules."
msgstr ""
#: ../Doc/library/shelve.rst:199
msgid "Module :mod:`dbm`"
msgstr "Module :mod:`dbm`"
#: ../Doc/library/shelve.rst:199
msgid "Standard Unix database interface."
msgstr ""
#: ../Doc/library/shelve.rst:202
msgid "Module :mod:`dumbdbm`"
msgstr ""
#: ../Doc/library/shelve.rst:202
msgid "Portable implementation of the ``dbm`` interface."
msgstr ""
#: ../Doc/library/shelve.rst:205
msgid "Module :mod:`gdbm`"
msgstr ""
#: ../Doc/library/shelve.rst:205
msgid "GNU database interface, based on the ``dbm`` interface."
msgstr ""
#: ../Doc/library/shelve.rst:208
msgid "Module :mod:`pickle`"
msgstr "Module :mod:`pickle`"
#: ../Doc/library/shelve.rst:208
msgid "Object serialization used by :mod:`shelve`."
msgstr "Sérialisation d'objet utilisé par :mod:`shelve`."
#: ../Doc/library/shelve.rst:210
msgid "Module :mod:`cPickle`"
msgstr ""
#: ../Doc/library/shelve.rst:211
msgid "High-performance version of :mod:`pickle`."
msgstr ""