Backport from 3.8

This commit is contained in:
Julien Palard 2019-12-06 14:21:00 +01:00
parent dc5751cce1
commit f1d4ff76d1
37 changed files with 2936 additions and 482 deletions

View File

@ -18,7 +18,7 @@ msgstr ""
#: ../Doc/distutils/packageindex.rst:9 #: ../Doc/distutils/packageindex.rst:9
msgid "The Python Package Index (PyPI)" msgid "The Python Package Index (PyPI)"
msgstr "" msgstr "L'index de paquets Python (*Python Package Index* : PyPI)"
#: ../Doc/distutils/packageindex.rst:11 #: ../Doc/distutils/packageindex.rst:11
msgid "" msgid ""

View File

@ -380,7 +380,7 @@ msgstr ""
#: ../Doc/distutils/setupscript.rst:335 #: ../Doc/distutils/setupscript.rst:335
msgid "Other options" msgid "Other options"
msgstr "" msgstr "Autres options"
#: ../Doc/distutils/setupscript.rst:337 #: ../Doc/distutils/setupscript.rst:337
msgid "" msgid ""

View File

@ -541,13 +541,16 @@ msgstr ""
#: ../Doc/extending/extending.rst:309 #: ../Doc/extending/extending.rst:309
msgid "The Module's Method Table and Initialization Function" msgid "The Module's Method Table and Initialization Function"
msgstr "" msgstr "La fonction d'initialisation et le tableau des méthodes du module"
#: ../Doc/extending/extending.rst:311 #: ../Doc/extending/extending.rst:311
msgid "" msgid ""
"I promised to show how :c:func:`spam_system` is called from Python programs. " "I promised to show how :c:func:`spam_system` is called from Python programs. "
"First, we need to list its name and address in a \"method table\"::" "First, we need to list its name and address in a \"method table\"::"
msgstr "" msgstr ""
"Nous avons promis de montrer comment :c:func:`spam_system` est appelée "
"depuis les programmes Python. D'abord, nous avons besoin d'avoir son nom et "
"son adresse dans un « tableau des méthodes » ::"
#: ../Doc/extending/extending.rst:322 #: ../Doc/extending/extending.rst:322
msgid "" msgid ""
@ -557,6 +560,11 @@ msgid ""
"value of ``0`` means that an obsolete variant of :c:func:`PyArg_ParseTuple` " "value of ``0`` means that an obsolete variant of :c:func:`PyArg_ParseTuple` "
"is used." "is used."
msgstr "" msgstr ""
"Notez la troisième entrée (``METH_VARARGS``). C'est un indicateur du type de "
"convention à utiliser pour la fonction C, à destination de l'interpréteur. "
"Il doit valoir normalement ``METH_VARARGS`` ou ``METH_VARARGS | "
"METH_KEYWORDS`` ; la valeur ``0`` indique qu'une variante obsolète de :c:"
"func:`PyArg_ParseTuple` est utilisée."
#: ../Doc/extending/extending.rst:327 #: ../Doc/extending/extending.rst:327
msgid "" msgid ""
@ -564,6 +572,10 @@ msgid ""
"level parameters to be passed in as a tuple acceptable for parsing via :c:" "level parameters to be passed in as a tuple acceptable for parsing via :c:"
"func:`PyArg_ParseTuple`; more information on this function is provided below." "func:`PyArg_ParseTuple`; more information on this function is provided below."
msgstr "" msgstr ""
"Si seulement ``METH_VARARGS`` est utilisé, la fonction s'attend à ce que les "
"paramètres Python soient passés comme un n-uplet que l'on peut analyser "
"*via* :c:func:`PyArg_ParseTuple` ; des informations supplémentaires sont "
"fournies plus bas."
#: ../Doc/extending/extending.rst:331 #: ../Doc/extending/extending.rst:331
msgid "" msgid ""
@ -573,6 +585,11 @@ msgid ""
"keywords. Use :c:func:`PyArg_ParseTupleAndKeywords` to parse the arguments " "keywords. Use :c:func:`PyArg_ParseTupleAndKeywords` to parse the arguments "
"to such a function." "to such a function."
msgstr "" msgstr ""
"Le bit :const:`METH_KEYWORDS` peut être mis à un dans le troisième champ si "
"des arguments par mot-clés doivent être passés à la fonction. Dans ce cas, "
"la fonction C doit accepter un troisième paramètre ``PyObject *`` qui est un "
"dictionnaire des mots-clés. Utilisez :c:func:`PyArg_ParseTupleAndKeywords` "
"pour analyser les arguments d'une telle fonction."
#: ../Doc/extending/extending.rst:337 #: ../Doc/extending/extending.rst:337
msgid "" msgid ""

View File

@ -30,10 +30,15 @@ msgid ""
"exceptions and even new types in C. This is explained in the document :ref:" "exceptions and even new types in C. This is explained in the document :ref:"
"`extending-index`." "`extending-index`."
msgstr "" msgstr ""
"Oui, vous pouvez créer des modules intégrés contenant des fonctions, des "
"variables, des exceptions et même de nouveaux types en C. Ceci est expliqué "
"dans le document :ref:`extending-index`."
#: ../Doc/faq/extending.rst:19 #: ../Doc/faq/extending.rst:19
msgid "Most intermediate or advanced Python books will also cover this topic." msgid "Most intermediate or advanced Python books will also cover this topic."
msgstr "" msgstr ""
"La plupart des livres Python intermédiaires ou avancés couvrent également ce "
"sujet."
#: ../Doc/faq/extending.rst:23 #: ../Doc/faq/extending.rst:23
msgid "Can I create my own functions in C++?" msgid "Can I create my own functions in C++?"
@ -96,6 +101,7 @@ msgstr ""
#: ../Doc/faq/extending.rst:64 #: ../Doc/faq/extending.rst:64
msgid "How can I execute arbitrary Python statements from C?" msgid "How can I execute arbitrary Python statements from C?"
msgstr "" msgstr ""
"Comment puis-je exécuter des instructions quelconques Python à partir de C ?"
#: ../Doc/faq/extending.rst:66 #: ../Doc/faq/extending.rst:66
msgid "" msgid ""
@ -110,6 +116,7 @@ msgstr ""
#: ../Doc/faq/extending.rst:75 #: ../Doc/faq/extending.rst:75
msgid "How can I evaluate an arbitrary Python expression from C?" msgid "How can I evaluate an arbitrary Python expression from C?"
msgstr "" msgstr ""
"Comment puis-je évaluer une expression quelconque de Python à partir de C ?"
#: ../Doc/faq/extending.rst:77 #: ../Doc/faq/extending.rst:77
msgid "" msgid ""
@ -117,10 +124,13 @@ msgid ""
"start symbol :c:data:`Py_eval_input`; it parses an expression, evaluates it " "start symbol :c:data:`Py_eval_input`; it parses an expression, evaluates it "
"and returns its value." "and returns its value."
msgstr "" msgstr ""
"Appelez la fonction :c:func:`PyRun_String` de la question précédente avec le "
"symbole de départ :c:data:`Py_eval_input` ; il analyse une expression, "
"l'évalue et renvoie sa valeur."
#: ../Doc/faq/extending.rst:83 #: ../Doc/faq/extending.rst:83
msgid "How do I extract C values from a Python object?" msgid "How do I extract C values from a Python object?"
msgstr "" msgstr "Comment puis-je extraire des donnés en C d'un objet Python ?"
#: ../Doc/faq/extending.rst:85 #: ../Doc/faq/extending.rst:85
msgid "" msgid ""
@ -129,6 +139,10 @@ msgid ""
"specified index. Lists have similar functions, :c:func:`PyListSize` and :c:" "specified index. Lists have similar functions, :c:func:`PyListSize` and :c:"
"func:`PyList_GetItem`." "func:`PyList_GetItem`."
msgstr "" msgstr ""
"Cela dépend du type d'objet. Si c'est un tuple, :c:func:`PyTuple_Size` "
"renvoie sa longueur et :c:func:`PyTuple_GetItem` renvoie l'élément à l'index "
"spécifié. Les listes ont des fonctions similaires, :c:func:`PyListSize` et :"
"c:func:`PyList_GetItem`."
#: ../Doc/faq/extending.rst:90 #: ../Doc/faq/extending.rst:90
msgid "" msgid ""
@ -156,6 +170,7 @@ msgstr ""
#: ../Doc/faq/extending.rst:105 #: ../Doc/faq/extending.rst:105
msgid "How do I use Py_BuildValue() to create a tuple of arbitrary length?" msgid "How do I use Py_BuildValue() to create a tuple of arbitrary length?"
msgstr "" msgstr ""
"Comment utiliser Py_BuildValue() pour créer un tuple de longueur définie ?"
#: ../Doc/faq/extending.rst:107 #: ../Doc/faq/extending.rst:107
msgid "" msgid ""
@ -170,7 +185,7 @@ msgstr ""
#: ../Doc/faq/extending.rst:116 #: ../Doc/faq/extending.rst:116
msgid "How do I call an object's method from C?" msgid "How do I call an object's method from C?"
msgstr "" msgstr "Comment puis-je appeler la méthode d'un objet à partir de C ?"
#: ../Doc/faq/extending.rst:118 #: ../Doc/faq/extending.rst:118
msgid "" msgid ""
@ -179,6 +194,10 @@ msgid ""
"to call, a format string like that used with :c:func:`Py_BuildValue`, and " "to call, a format string like that used with :c:func:`Py_BuildValue`, and "
"the argument values::" "the argument values::"
msgstr "" msgstr ""
"La fonction :c:func:`PyObject_CallMethod` peut être utilisée pour appeler la "
"méthode d'un objet. Les paramètres sont l'objet, le nom de la méthode à "
"appeler, une chaîne de caractères comme celle utilisée pour :c:func:"
"`Py_BuildValue` et les valeurs des arguments ::"
#: ../Doc/faq/extending.rst:127 #: ../Doc/faq/extending.rst:127
msgid "" msgid ""
@ -186,12 +205,17 @@ msgid ""
"defined. You are responsible for eventually :c:func:`Py_DECREF`\\ 'ing the " "defined. You are responsible for eventually :c:func:`Py_DECREF`\\ 'ing the "
"return value." "return value."
msgstr "" msgstr ""
"Cela fonctionne pour tous les objets qui ont des méthodes — qu'elles soient "
"intégrées ou définies par l'utilisateur. Vous êtes responsable de « :c:func:"
"`Py_DECREF`\\ *er* » la valeur de retour à la fin."
#: ../Doc/faq/extending.rst:130 #: ../Doc/faq/extending.rst:130
msgid "" msgid ""
"To call, e.g., a file object's \"seek\" method with arguments 10, 0 " "To call, e.g., a file object's \"seek\" method with arguments 10, 0 "
"(assuming the file object pointer is \"f\")::" "(assuming the file object pointer is \"f\")::"
msgstr "" msgstr ""
"Pour appeler, p. ex., la méthode *seek* d'un objet *file* avec les arguments "
"10, 0 (en supposant que le pointeur de l'objet fichier est *f*) ::"
#: ../Doc/faq/extending.rst:141 #: ../Doc/faq/extending.rst:141
msgid "" msgid ""
@ -200,12 +224,18 @@ msgid ""
"format, and to call a function with one argument, surround the argument in " "format, and to call a function with one argument, surround the argument in "
"parentheses, e.g. \"(i)\"." "parentheses, e.g. \"(i)\"."
msgstr "" msgstr ""
"Notez que :c:func:`PyObject_CallObject` veut *toujours* un tuple comme liste "
"d'arguments. Aussi, pour appeler une fonction sans arguments, utilisez "
"\"()\" pour être conforme au type et, pour appeler une fonction avec un "
"paramètre, entourez-le de parenthèses, p. ex. \"(i)\"."
#: ../Doc/faq/extending.rst:148 #: ../Doc/faq/extending.rst:148
msgid "" msgid ""
"How do I catch the output from PyErr_Print() (or anything that prints to " "How do I catch the output from PyErr_Print() (or anything that prints to "
"stdout/stderr)?" "stdout/stderr)?"
msgstr "" msgstr ""
"Comment puis-je récupérer la sortie de ``PyErr_Print()`` (ou tout ce qui "
"s'affiche sur *stdout*/*stderr*) ?"
#: ../Doc/faq/extending.rst:150 #: ../Doc/faq/extending.rst:150
msgid "" msgid ""
@ -214,6 +244,11 @@ msgid ""
"print_error, or just allow the standard traceback mechanism to work. Then, " "print_error, or just allow the standard traceback mechanism to work. Then, "
"the output will go wherever your ``write()`` method sends it." "the output will go wherever your ``write()`` method sends it."
msgstr "" msgstr ""
"Dans le code Python, définissez un objet qui possède la méthode ``write()``. "
"Affectez cet objet à :data:`sys.stdout` et :data:`sys.stderr`. Appelez "
"*print_error* ou faites simplement en sorte que le mécanisme standard de "
"remontée des erreurs fonctionne. Ensuite, la sortie sera dirigée vers "
"l'endroit où votre méthode ``write()`` écrit."
#: ../Doc/faq/extending.rst:155 #: ../Doc/faq/extending.rst:155
msgid "" msgid ""
@ -227,11 +262,11 @@ msgstr ""
#: ../Doc/faq/extending.rst:177 #: ../Doc/faq/extending.rst:177
msgid "How do I access a module written in Python from C?" msgid "How do I access a module written in Python from C?"
msgstr "" msgstr "Comment accéder à un module écrit en Python à partir de C ?"
#: ../Doc/faq/extending.rst:179 #: ../Doc/faq/extending.rst:179
msgid "You can get a pointer to the module object as follows::" msgid "You can get a pointer to the module object as follows::"
msgstr "" msgstr "Vous pouvez obtenir un pointeur sur l'objet module comme suit ::"
#: ../Doc/faq/extending.rst:183 #: ../Doc/faq/extending.rst:183
msgid "" msgid ""
@ -241,22 +276,32 @@ msgid ""
"module into any namespace -- it only ensures it has been initialized and is " "module into any namespace -- it only ensures it has been initialized and is "
"stored in :data:`sys.modules`." "stored in :data:`sys.modules`."
msgstr "" msgstr ""
"Si le module n'a pas encore été importé (c.-à-d. qu'il n'est pas encore "
"présent dans :data:`sys.modules`), cela initialise le module ; sinon il "
"renvoie simplement la valeur de ``sys.modules[\"<modulename>\"]``. Notez "
"qu'il n'inscrit le module dans aucun espace de nommage — il s'assure "
"seulement qu'il a été initialisé et qu'il est stocké dans :data:`sys."
"modules`."
#: ../Doc/faq/extending.rst:189 #: ../Doc/faq/extending.rst:189
msgid "" msgid ""
"You can then access the module's attributes (i.e. any name defined in the " "You can then access the module's attributes (i.e. any name defined in the "
"module) as follows::" "module) as follows::"
msgstr "" msgstr ""
"Vous pouvez alors accéder aux attributs du module (c.-à-d. à tout nom défini "
"dans le module) comme suit ::"
#: ../Doc/faq/extending.rst:194 #: ../Doc/faq/extending.rst:194
msgid "" msgid ""
"Calling :c:func:`PyObject_SetAttrString` to assign to variables in the " "Calling :c:func:`PyObject_SetAttrString` to assign to variables in the "
"module also works." "module also works."
msgstr "" msgstr ""
"Appeler :c:func:`PyObject_SetAttrString` pour assigner des valeurs aux "
"variables du module fonctionne également."
#: ../Doc/faq/extending.rst:199 #: ../Doc/faq/extending.rst:199
msgid "How do I interface to C++ objects from Python?" msgid "How do I interface to C++ objects from Python?"
msgstr "" msgstr "Comment s'interfacer avec les objets C++ depuis Python ?"
#: ../Doc/faq/extending.rst:201 #: ../Doc/faq/extending.rst:201
msgid "" msgid ""
@ -267,14 +312,22 @@ msgid ""
"building a new Python type around a C structure (pointer) type will also " "building a new Python type around a C structure (pointer) type will also "
"work for C++ objects." "work for C++ objects."
msgstr "" msgstr ""
"Selon vos besoins, de nombreuses approches sont possibles. Pour le faire "
"manuellement, commencez par lire :ref:`le document \"Extension et intégration"
"\" <extending-index>`. Sachez que pour le système d'exécution Python, il n'y "
"a pas beaucoup de différence entre C et C++ — donc la méthode pour "
"construire un nouveau type Python à partir d'une structure C (pointeur) "
"fonctionne également avec des objets en C++."
#: ../Doc/faq/extending.rst:207 #: ../Doc/faq/extending.rst:207
msgid "For C++ libraries, see :ref:`c-wrapper-software`." msgid "For C++ libraries, see :ref:`c-wrapper-software`."
msgstr "" msgstr "Pour les bibliothèques C++, voir :ref:`c-wrapper-software`."
#: ../Doc/faq/extending.rst:211 #: ../Doc/faq/extending.rst:211
msgid "I added a module using the Setup file and the make fails; why?" msgid "I added a module using the Setup file and the make fails; why?"
msgstr "" msgstr ""
"J'ai ajouté un module en utilisant le fichier *Setup* et la compilation "
"échoue ; pourquoi ?"
#: ../Doc/faq/extending.rst:213 #: ../Doc/faq/extending.rst:213
msgid "" msgid ""
@ -282,30 +335,40 @@ msgid ""
"fails. (Fixing this requires some ugly shell script hackery, and this bug " "fails. (Fixing this requires some ugly shell script hackery, and this bug "
"is so minor that it doesn't seem worth the effort.)" "is so minor that it doesn't seem worth the effort.)"
msgstr "" msgstr ""
"Le fichier *Setup* doit se terminer par une ligne vide, s'il n'y a pas de "
"ligne vide, le processus de compilation échoue (ce problème peut se régler "
"en bidouillant un script shell, et ce bogue est si mineur qu'il ne mérite "
"pas qu'on s'y attarde)."
#: ../Doc/faq/extending.rst:219 #: ../Doc/faq/extending.rst:219
msgid "How do I debug an extension?" msgid "How do I debug an extension?"
msgstr "" msgstr "Comment déboguer une extension ?"
#: ../Doc/faq/extending.rst:221 #: ../Doc/faq/extending.rst:221
msgid "" msgid ""
"When using GDB with dynamically loaded extensions, you can't set a " "When using GDB with dynamically loaded extensions, you can't set a "
"breakpoint in your extension until your extension is loaded." "breakpoint in your extension until your extension is loaded."
msgstr "" msgstr ""
"Lorsque vous utilisez GDB avec des extensions chargées dynamiquement, vous "
"ne pouvez pas placer de point d'arrêt dans votre extension tant que celle-ci "
"n'est pas chargée."
#: ../Doc/faq/extending.rst:224 #: ../Doc/faq/extending.rst:224
msgid "In your ``.gdbinit`` file (or interactively), add the command:" msgid "In your ``.gdbinit`` file (or interactively), add the command:"
msgstr "" msgstr ""
"Dans votre fichier ``.gdbinit`` (ou manuellement), ajoutez la commande :"
#: ../Doc/faq/extending.rst:230 #: ../Doc/faq/extending.rst:230
msgid "Then, when you run GDB:" msgid "Then, when you run GDB:"
msgstr "" msgstr "Ensuite, lorsque vous exécutez GDB :"
#: ../Doc/faq/extending.rst:242 #: ../Doc/faq/extending.rst:242
msgid "" msgid ""
"I want to compile a Python module on my Linux system, but some files are " "I want to compile a Python module on my Linux system, but some files are "
"missing. Why?" "missing. Why?"
msgstr "" msgstr ""
"Je veux compiler un module Python sur mon système Linux, mais il manque "
"certains fichiers. Pourquoi ?"
#: ../Doc/faq/extending.rst:244 #: ../Doc/faq/extending.rst:244
msgid "" msgid ""
@ -313,14 +376,19 @@ msgid ""
"{x}/config/` directory, which contains various files required for compiling " "{x}/config/` directory, which contains various files required for compiling "
"Python extensions." "Python extensions."
msgstr "" msgstr ""
"La plupart des versions pré-compilées de Python n'incluent pas le "
"répertoire :file:`/usr/lib/python2.{x}/config/`, qui contient les différents "
"fichiers nécessaires à la compilation des extensions Python."
#: ../Doc/faq/extending.rst:248 #: ../Doc/faq/extending.rst:248
msgid "For Red Hat, install the python-devel RPM to get the necessary files." msgid "For Red Hat, install the python-devel RPM to get the necessary files."
msgstr "" msgstr ""
"Pour Red Hat, installez le RPM *python-devel* pour obtenir les fichiers "
"nécessaires."
#: ../Doc/faq/extending.rst:250 #: ../Doc/faq/extending.rst:250
msgid "For Debian, run ``apt-get install python-dev``." msgid "For Debian, run ``apt-get install python-dev``."
msgstr "" msgstr "Pour Debian, exécutez ``apt-get install python-dev``."
#: ../Doc/faq/extending.rst:254 #: ../Doc/faq/extending.rst:254
msgid "" msgid ""
@ -347,6 +415,8 @@ msgstr ""
#: ../Doc/faq/extending.rst:268 #: ../Doc/faq/extending.rst:268
msgid "How do I tell \"incomplete input\" from \"invalid input\"?" msgid "How do I tell \"incomplete input\" from \"invalid input\"?"
msgstr "" msgstr ""
"Comment distinguer une « entrée incomplète » (*incomplete input*) d'une "
 entrée invalide » (*invalid input*) ?"
#: ../Doc/faq/extending.rst:270 #: ../Doc/faq/extending.rst:270
msgid "" msgid ""
@ -356,12 +426,19 @@ msgid ""
"parentheses or triple string quotes), but it gives you a syntax error " "parentheses or triple string quotes), but it gives you a syntax error "
"message immediately when the input is invalid." "message immediately when the input is invalid."
msgstr "" msgstr ""
"Parfois vous souhaitez émuler le comportement de l'interpréteur interactif "
"Python, quand il vous donne une invite de continuation lorsque l'entrée est "
"incomplète (par exemple, vous avez tapé le début d'une instruction \"if\" ou "
"vous n'avez pas fermé vos parenthèses ou triple guillemets) mais il vous "
"renvoie immédiatement une erreur syntaxique quand la saisie est incorrecte."
#: ../Doc/faq/extending.rst:276 #: ../Doc/faq/extending.rst:276
msgid "" msgid ""
"In Python you can use the :mod:`codeop` module, which approximates the " "In Python you can use the :mod:`codeop` module, which approximates the "
"parser's behavior sufficiently. IDLE uses this, for example." "parser's behavior sufficiently. IDLE uses this, for example."
msgstr "" msgstr ""
"En Python, vous pouvez utiliser le module :mod:`codeop`, qui se rapproche "
"assez du comportement de l'analyseur. Par exemple, IDLE l'utilise."
#: ../Doc/faq/extending.rst:279 #: ../Doc/faq/extending.rst:279
msgid "" msgid ""
@ -371,6 +448,12 @@ msgid ""
"to point at your custom input function. See ``Modules/readline.c`` and " "to point at your custom input function. See ``Modules/readline.c`` and "
"``Parser/myreadline.c`` for more hints." "``Parser/myreadline.c`` for more hints."
msgstr "" msgstr ""
"La façon la plus simple de le faire en C est d'appeler :c:func:"
"`PyRun_InteractiveLoop` (peut-être dans un autre fil d'exécution) et laisser "
"l'interpréteur Python gérer l'entrée pour vous. Vous pouvez également "
"définir :c:func:`PyOS_ReadlineFunctionPointer` pour pointer vers votre "
"fonction d'entrée personnalisée. Voir ``Modules/readline.c`` et ``Parser/"
"myreadline.c`` pour plus de conseils."
#: ../Doc/faq/extending.rst:285 #: ../Doc/faq/extending.rst:285
msgid "" msgid ""
@ -393,10 +476,21 @@ msgid ""
"\". Here is a complete example using the GNU readline library (you may want " "\". Here is a complete example using the GNU readline library (you may want "
"to ignore **SIGINT** while calling readline())::" "to ignore **SIGINT** while calling readline())::"
msgstr "" msgstr ""
"Une autre solution est d'essayer de compiler la chaîne reçue avec :c:func:"
"`Py_CompileString`. Si cela se compile sans erreur, essayez d'exécuter "
"l'objet code renvoyé en appelant :c:func:`PyEval_EvalCode`. Sinon, "
"enregistrez l'entrée pour plus tard. Si la compilation échoue, vérifiez s'il "
"s'agit d'une erreur ou s'il faut juste plus de données — en extrayant la "
"chaîne de message du tuple d'exception et en la comparant à la chaîne *"
"\"unexpected EOF while parsing\"*. Voici un exemple complet d'utilisation de "
"la bibliothèque *readline* de GNU (il vous est possible d'ignorer **SIGINT** "
"lors de l'appel à ``readline()``) ::"
#: ../Doc/faq/extending.rst:439 #: ../Doc/faq/extending.rst:439
msgid "How do I find undefined g++ symbols __builtin_new or __pure_virtual?" msgid "How do I find undefined g++ symbols __builtin_new or __pure_virtual?"
msgstr "" msgstr ""
"Comment puis-je trouver les symboles g++ indéfinis ``__builtin_new`` ou "
"``__pure_virtual`` ?"
#: ../Doc/faq/extending.rst:441 #: ../Doc/faq/extending.rst:441
msgid "" msgid ""
@ -404,18 +498,27 @@ msgid ""
"it using g++ (change LINKCC in the Python Modules Makefile), and link your " "it using g++ (change LINKCC in the Python Modules Makefile), and link your "
"extension module using g++ (e.g., ``g++ -shared -o mymodule.so mymodule.o``)." "extension module using g++ (e.g., ``g++ -shared -o mymodule.so mymodule.o``)."
msgstr "" msgstr ""
"Pour charger dynamiquement les modules d'extension g++, vous devez "
"recompiler Python, effectuer l'édition de liens en utilisant g++ (modifiez "
"*LINKCC* dans le *Python Modules Makefile*), et effectuer l'édition de liens "
"de votre module d'extension avec g++ (par exemple, ``g++ -shared -o mymodule."
"so mymodule.o``)."
#: ../Doc/faq/extending.rst:447 #: ../Doc/faq/extending.rst:447
msgid "" msgid ""
"Can I create an object class with some methods implemented in C and others " "Can I create an object class with some methods implemented in C and others "
"in Python (e.g. through inheritance)?" "in Python (e.g. through inheritance)?"
msgstr "" msgstr ""
"Puis-je créer une classe d'objets avec certaines méthodes implémentées en C "
"et d'autres en Python (p. ex. en utilisant l'héritage) ?"
#: ../Doc/faq/extending.rst:449 #: ../Doc/faq/extending.rst:449
msgid "" msgid ""
"Yes, you can inherit from built-in classes such as :class:`int`, :class:" "Yes, you can inherit from built-in classes such as :class:`int`, :class:"
"`list`, :class:`dict`, etc." "`list`, :class:`dict`, etc."
msgstr "" msgstr ""
"Oui, vous pouvez hériter de classes intégrées telles que :class:`int`, :"
"class:`list`, :class:`dict`, etc."
#: ../Doc/faq/extending.rst:452 #: ../Doc/faq/extending.rst:452
msgid "" msgid ""
@ -423,6 +526,9 @@ msgid ""
"html) provides a way of doing this from C++ (i.e. you can inherit from an " "html) provides a way of doing this from C++ (i.e. you can inherit from an "
"extension class written in C++ using the BPL)." "extension class written in C++ using the BPL)."
msgstr "" msgstr ""
"La bibliothèque *Boost Python Library* (BPL, http://www.boost.org/libs/"
"python/doc/index.html) fournit un moyen de le faire depuis C++ (c.-à-d. que "
"vous pouvez hériter d'une classe d'extension écrite en C++ en utilisant BPL)."
#: ../Doc/faq/extending.rst:458 #: ../Doc/faq/extending.rst:458
msgid "" msgid ""

View File

@ -53,6 +53,11 @@ msgid ""
"targets. Language bindings are available for a number of languages " "targets. Language bindings are available for a number of languages "
"including Python, Perl, Ruby, etc." "including Python, Perl, Ruby, etc."
msgstr "" msgstr ""
"`wxWidgets` (https://www.wxwidgets.org) est une librairie de classe IUG "
"portable et gratuite écrite en C++ qui fournit une apparence native sur un "
"certain nombre de plates-formes, elle est notamment en version stable pour "
"Windows, Mac OS X, GTK et X11. Des clients sont disponibles pour un certain "
"nombre de langages, y compris Python, Perl, Ruby, etc."
#: ../Doc/faq/gui.rst:36 #: ../Doc/faq/gui.rst:36
msgid "" msgid ""
@ -74,10 +79,14 @@ msgid ""
"licences that allow their use in commercial products as well as in freeware " "licences that allow their use in commercial products as well as in freeware "
"or shareware." "or shareware."
msgstr "" msgstr ""
"*wxWidgets* et *wxPython* sont tous deux des logiciels libres, open source, "
"avec des licences permissives qui permettent leur utilisation dans des "
"produits commerciaux ainsi que dans des logiciels gratuits ou contributifs "
"(*shareware*)."
#: ../Doc/faq/gui.rst:48 #: ../Doc/faq/gui.rst:48
msgid "Qt" msgid "Qt"
msgstr "" msgstr "*Qt*"
#: ../Doc/faq/gui.rst:50 #: ../Doc/faq/gui.rst:50
msgid "" msgid ""
@ -89,16 +98,26 @@ msgid ""
"com/commercial/license-faq>`_ if you want to write proprietary " "com/commercial/license-faq>`_ if you want to write proprietary "
"applications. PySide is free for all applications." "applications. PySide is free for all applications."
msgstr "" msgstr ""
"Il existe des liens disponibles pour la boîte à outils *Qt* (en utilisant "
"soit `PyQt <https://riverbankcomputing.com/software/pyqt/intro>`_ ou `PySide "
"<https://wiki.qt.io/PySide>`_) et pour *KDE* (`PyKDE4 <https://techbase.kde."
"org/Languages/Python/Using_PyKDE_4>`__). *PyQt* est actuellement plus mûre "
"que *PySide*, mais*PyQt* nécessite d'acheter une licence de `Riverbank "
"Computing <https://www.riverbankcomputing.com/commercial/license-faq>`_ si "
"vous voulez écrire des applications propriétaires. *PySide* est gratuit "
"pour toutes les applications."
#: ../Doc/faq/gui.rst:57 #: ../Doc/faq/gui.rst:57
msgid "" msgid ""
"Qt 4.5 upwards is licensed under the LGPL license; also, commercial licenses " "Qt 4.5 upwards is licensed under the LGPL license; also, commercial licenses "
"are available from `The Qt Company <https://www.qt.io/licensing/>`_." "are available from `The Qt Company <https://www.qt.io/licensing/>`_."
msgstr "" msgstr ""
"*Qt >= 4.5* est sous licence LGPL ; de plus, des licences commerciales sont "
"disponibles auprès de `The Qt Company <https://www.qt.io/licensing/>`_."
#: ../Doc/faq/gui.rst:61 #: ../Doc/faq/gui.rst:61
msgid "Gtk+" msgid "Gtk+"
msgstr "" msgstr "*Gtk+*"
#: ../Doc/faq/gui.rst:63 #: ../Doc/faq/gui.rst:63
msgid "" msgid ""
@ -108,7 +127,7 @@ msgstr ""
#: ../Doc/faq/gui.rst:67 #: ../Doc/faq/gui.rst:67
msgid "FLTK" msgid "FLTK"
msgstr "" msgstr "*FLTK*"
#: ../Doc/faq/gui.rst:69 #: ../Doc/faq/gui.rst:69
msgid "" msgid ""
@ -116,6 +135,9 @@ msgid ""
"powerful and mature cross-platform windowing system, are available from `the " "powerful and mature cross-platform windowing system, are available from `the "
"PyFLTK project <http://pyfltk.sourceforge.net>`_." "PyFLTK project <http://pyfltk.sourceforge.net>`_."
msgstr "" msgstr ""
"Les liaisons Python pour `the FLTK toolkit <http://www.fltk.org>`_, un "
"système de fenêtrage multi-plateformes simple mais puissant et mûr, sont "
"disponibles auprès de `the PyFLTK project <http://pyfltk.sourceforge.net>`_."
#: ../Doc/faq/gui.rst:75 #: ../Doc/faq/gui.rst:75
msgid "FOX" msgid "FOX"
@ -130,15 +152,18 @@ msgstr ""
#: ../Doc/faq/gui.rst:83 #: ../Doc/faq/gui.rst:83
msgid "OpenGL" msgid "OpenGL"
msgstr "" msgstr "*OpenGL*"
#: ../Doc/faq/gui.rst:85 #: ../Doc/faq/gui.rst:85
msgid "For OpenGL bindings, see `PyOpenGL <http://pyopengl.sourceforge.net>`_." msgid "For OpenGL bindings, see `PyOpenGL <http://pyopengl.sourceforge.net>`_."
msgstr "" msgstr ""
"Pour les clients OpenGL, voir `PyOpenGL <http://pyopengl.sourceforge.net>`_."
#: ../Doc/faq/gui.rst:89 #: ../Doc/faq/gui.rst:89
msgid "What platform-specific GUI toolkits exist for Python?" msgid "What platform-specific GUI toolkits exist for Python?"
msgstr "" msgstr ""
"Quelles boîtes à outils IUG spécifiques à la plate-forme existent pour "
"Python ?"
#: ../Doc/faq/gui.rst:91 #: ../Doc/faq/gui.rst:91
msgid "" msgid ""
@ -152,14 +177,17 @@ msgid ""
"Microsoft Foundation Classes and a Python programming environment that's " "Microsoft Foundation Classes and a Python programming environment that's "
"written mostly in Python using the MFC classes." "written mostly in Python using the MFC classes."
msgstr "" msgstr ""
":ref:`Pythonwin <windows-faq>` de Mark Hammond inclut une interface vers les "
"classes `Microsoft Foundation Classes` et un environnement de programmation "
"Python qui est écrit principalement en Python utilisant les classes *MFC*."
#: ../Doc/faq/gui.rst:101 #: ../Doc/faq/gui.rst:101
msgid "Tkinter questions" msgid "Tkinter questions"
msgstr "" msgstr "Questions à propos de *Tkinter*"
#: ../Doc/faq/gui.rst:104 #: ../Doc/faq/gui.rst:104
msgid "How do I freeze Tkinter applications?" msgid "How do I freeze Tkinter applications?"
msgstr "" msgstr "Comment puis-je geler (*freezer*) les applications *Tkinter* ?"
#: ../Doc/faq/gui.rst:106 #: ../Doc/faq/gui.rst:106
msgid "" msgid ""
@ -167,6 +195,10 @@ msgid ""
"applications, the applications will not be truly stand-alone, as the " "applications, the applications will not be truly stand-alone, as the "
"application will still need the Tcl and Tk libraries." "application will still need the Tcl and Tk libraries."
msgstr "" msgstr ""
"*Freeze* est un outil pour créer des applications autonomes. Lors du "
"*freezage* des applications Tkinter, les applications ne seront pas vraiment "
"autonomes, car l'application aura toujours besoin des bibliothèques Tcl et "
"Tk."
#: ../Doc/faq/gui.rst:110 #: ../Doc/faq/gui.rst:110
msgid "" msgid ""
@ -174,6 +206,9 @@ msgid ""
"point to them at run-time using the :envvar:`TCL_LIBRARY` and :envvar:" "point to them at run-time using the :envvar:`TCL_LIBRARY` and :envvar:"
"`TK_LIBRARY` environment variables." "`TK_LIBRARY` environment variables."
msgstr "" msgstr ""
"Une solution consiste à empaqueter les bibliothèques *Tcl* et *Tk* dans "
"l'application et de les retrouver à l'exécution en utilisant les variables "
"d'environnement :envvar:`TCL_LIBRARY` et :envvar:`TK_LIBRARY`."
#: ../Doc/faq/gui.rst:114 #: ../Doc/faq/gui.rst:114
msgid "" msgid ""
@ -182,6 +217,10 @@ msgid ""
"is SAM (stand-alone modules), which is part of the Tix distribution (http://" "is SAM (stand-alone modules), which is part of the Tix distribution (http://"
"tix.sourceforge.net/)." "tix.sourceforge.net/)."
msgstr "" msgstr ""
"Pour obtenir des applications vraiment autonomes, les scripts *Tcl* qui "
"forment la bibliothèque doivent également être intégrés dans l'application. "
"Un outil supportant cela est *SAM* (modules autonomes), qui fait partie de "
"la distribution *Tix* (http://tix.sourceforge.net/)."
#: ../Doc/faq/gui.rst:119 #: ../Doc/faq/gui.rst:119
msgid "" msgid ""
@ -189,10 +228,14 @@ msgid ""
"`Tclsam_init`, etc. inside Python's :file:`Modules/tkappinit.c`, and link " "`Tclsam_init`, etc. inside Python's :file:`Modules/tkappinit.c`, and link "
"with libtclsam and libtksam (you might include the Tix libraries as well)." "with libtclsam and libtksam (you might include the Tix libraries as well)."
msgstr "" msgstr ""
"Compilez Tix avec SAM activé, exécutez l'appel approprié à :c:func:"
"`Tclsam_init`, etc. dans le fichier :file:`Modules/tkappinit.c` de Python, "
"et liez avec *libtclsam* et *libtksam* (il est également possible d'inclure "
"les bibliothèques *Tix*)."
#: ../Doc/faq/gui.rst:126 #: ../Doc/faq/gui.rst:126
msgid "Can I have Tk events handled while waiting for I/O?" msgid "Can I have Tk events handled while waiting for I/O?"
msgstr "" msgstr "Puis-je modifier des événements *Tk* pendant l'écoute des *E/S* ?"
#: ../Doc/faq/gui.rst:128 #: ../Doc/faq/gui.rst:128
msgid "" msgid ""
@ -202,10 +245,18 @@ msgid ""
"function which will be called from the Tk mainloop when I/O is possible on a " "function which will be called from the Tk mainloop when I/O is possible on a "
"file descriptor. See :ref:`tkinter-file-handlers`." "file descriptor. See :ref:`tkinter-file-handlers`."
msgstr "" msgstr ""
"Sur d'autres plates-formes que Windows, oui, et vous n'avez même pas besoin "
"de fils d'exécution multiples ! Mais vous devrez restructurer un peu votre "
"code *E/S*. *Tk* possède l'équivalent de l'appel :c:func:`XtAddInput()` de "
"*Xt*, qui vous permet d'enregistrer une fonction de *callback* qui sera "
"appelée par la boucle principale *Tk* lorsque des *E/S* sont disponibles sur "
"un descripteur de fichier. Voir :ref:`tkinter-file-handlers`."
#: ../Doc/faq/gui.rst:136 #: ../Doc/faq/gui.rst:136
msgid "I can't get key bindings to work in Tkinter: why?" msgid "I can't get key bindings to work in Tkinter: why?"
msgstr "" msgstr ""
"Je n'arrive pas à faire fonctionner les raccourcis clavier dans *Tkinter* : "
"pourquoi ?"
#: ../Doc/faq/gui.rst:138 #: ../Doc/faq/gui.rst:138
msgid "" msgid ""
@ -213,6 +264,9 @@ msgid ""
"meth:`bind` method don't get handled even when the appropriate key is " "meth:`bind` method don't get handled even when the appropriate key is "
"pressed." "pressed."
msgstr "" msgstr ""
"Une raison récurrente est que les gestionnaires dévènements liés à des "
"évènements avec la méthode :meth:`bind` ne sont pas pris en charge même "
"lorsque la touche appropriée est activée."
#: ../Doc/faq/gui.rst:141 #: ../Doc/faq/gui.rst:141
msgid "" msgid ""
@ -221,3 +275,8 @@ msgid ""
"focus command. Usually a widget is given the keyboard focus by clicking in " "focus command. Usually a widget is given the keyboard focus by clicking in "
"it (but not for labels; see the takefocus option)." "it (but not for labels; see the takefocus option)."
msgstr "" msgstr ""
"La cause la plus fréquente est que l'objet graphique auquel s'applique la "
"liaison n'a pas de « focus clavier ». Consultez la documentation *Tk* pour "
"la commande *focus*. Habituellement, un objet graphique reçoit le focus du "
"clavier en cliquant dessus (mais pas pour les étiquettes ; voir l'option "
"*takefocus*)."

View File

@ -36,6 +36,9 @@ msgid ""
"relevant standard library module. (Eventually you'll learn what's in the " "relevant standard library module. (Eventually you'll learn what's in the "
"standard library and will be able to skip this step.)" "standard library and will be able to skip this step.)"
msgstr "" msgstr ""
"Regardez si la :ref:`bibliothèque standard <library-index>` contient un "
"module approprié (avec l'expérience, vous connaitrez le contenu de la "
"bibliothèque standard et pourrez sauter cette étape)."
#: ../Doc/faq/library.rst:21 #: ../Doc/faq/library.rst:21
msgid "" msgid ""
@ -58,6 +61,12 @@ msgid ""
"file:`mathmodule.c`, somewhere in a C source directory (not on the Python " "file:`mathmodule.c`, somewhere in a C source directory (not on the Python "
"Path)." "Path)."
msgstr "" msgstr ""
"Si vous ne parvenez pas à trouver le fichier source d'un module, c'est peut-"
"être parce que celui-ci est un module natif ou bien un module implémenté en "
"C, C++, ou autre langage compilé, qui est chargé dynamiquement. Dans ce cas, "
"vous ne possédez peut-être pas le fichier source ou celui-ci est en réalité "
"stocké quelque part dans un dossier de fichiers source C (qui ne sera pas "
"dans le chemin Python), comme par exemple :file:`mathmodule.c`."
#: ../Doc/faq/library.rst:35 #: ../Doc/faq/library.rst:35
msgid "There are (at least) three kinds of modules in Python:" msgid "There are (at least) three kinds of modules in Python:"
@ -79,10 +88,12 @@ msgid ""
"modules written in C and linked with the interpreter; to get a list of " "modules written in C and linked with the interpreter; to get a list of "
"these, type::" "these, type::"
msgstr "" msgstr ""
"les modules écrits en C et liés à l'interpréteur ; pour obtenir leur liste, "
"entrez ::"
#: ../Doc/faq/library.rst:47 #: ../Doc/faq/library.rst:47
msgid "How do I make a Python script executable on Unix?" msgid "How do I make a Python script executable on Unix?"
msgstr "" msgstr "Comment rendre un script Python exécutable sous Unix ?"
#: ../Doc/faq/library.rst:49 #: ../Doc/faq/library.rst:49
msgid "" msgid ""
@ -90,24 +101,31 @@ msgid ""
"first line must begin with ``#!`` followed by the path of the Python " "first line must begin with ``#!`` followed by the path of the Python "
"interpreter." "interpreter."
msgstr "" msgstr ""
"Deux conditions doivent être remplies : les droits d'accès au fichier "
"doivent permettre son exécution et la première ligne du script doit "
"commencer par ``#!`` suivi du chemin vers l'interpréteur Python."
#: ../Doc/faq/library.rst:53 #: ../Doc/faq/library.rst:53
msgid "" msgid ""
"The first is done by executing ``chmod +x scriptfile`` or perhaps ``chmod " "The first is done by executing ``chmod +x scriptfile`` or perhaps ``chmod "
"755 scriptfile``." "755 scriptfile``."
msgstr "" msgstr ""
"La première condition est remplie en exécutant ``chmod +x scriptfile`` ou "
"``chmod 755 scriptfile``."
#: ../Doc/faq/library.rst:56 #: ../Doc/faq/library.rst:56
msgid "" msgid ""
"The second can be done in a number of ways. The most straightforward way is " "The second can be done in a number of ways. The most straightforward way is "
"to write ::" "to write ::"
msgstr "" msgstr ""
"Il y a plusieurs façons de remplir la seconde. La plus simple consiste à "
"écrire au tout début du fichier ::"
#: ../Doc/faq/library.rst:61 #: ../Doc/faq/library.rst:61
msgid "" msgid ""
"as the very first line of your file, using the pathname for where the Python " "as the very first line of your file, using the pathname for where the Python "
"interpreter is installed on your platform." "interpreter is installed on your platform."
msgstr "" msgstr "en utilisant le chemin de l'interpréteur Python sur votre machine."
#: ../Doc/faq/library.rst:64 #: ../Doc/faq/library.rst:64
msgid "" msgid ""
@ -116,6 +134,11 @@ msgid ""
"variants support the following, assuming the Python interpreter is in a " "variants support the following, assuming the Python interpreter is in a "
"directory on the user's :envvar:`PATH`::" "directory on the user's :envvar:`PATH`::"
msgstr "" msgstr ""
"Pour rendre ce script indépendant de la localisation de l'interpréteur "
"Python, il faut utiliser le programme :program:`env`. La ligne ci-dessous "
"fonctionne sur la quasi-totalité des dérivés de Unix, à condition que "
"l'interpréteur Python soit dans un dossier référencé dans la variable :"
"envvar:`PATH` de l'utilisateur ::"
#: ../Doc/faq/library.rst:71 #: ../Doc/faq/library.rst:71
msgid "" msgid ""
@ -123,6 +146,9 @@ msgid ""
"scripts is often very minimal, so you need to use the actual absolute " "scripts is often very minimal, so you need to use the actual absolute "
"pathname of the interpreter." "pathname of the interpreter."
msgstr "" msgstr ""
"Ne faites *pas* ceci pour des scripts CGI. La variable :envvar:`PATH` des "
"scripts CGI est souvent très succincte, il faut par conséquent préciser le "
"chemin absolu réel de l'interpréteur."
#: ../Doc/faq/library.rst:75 #: ../Doc/faq/library.rst:75
msgid "" msgid ""
@ -136,10 +162,12 @@ msgid ""
"The minor disadvantage is that this defines the script's __doc__ string. " "The minor disadvantage is that this defines the script's __doc__ string. "
"However, you can fix that by adding ::" "However, you can fix that by adding ::"
msgstr "" msgstr ""
"Le léger inconvénient est que cela définit la variable *__doc__* du script. "
"Cependant, il est possible de corriger cela en ajoutant ::"
#: ../Doc/faq/library.rst:92 #: ../Doc/faq/library.rst:92
msgid "Is there a curses/termcap package for Python?" msgid "Is there a curses/termcap package for Python?"
msgstr "" msgstr "Existe-t'il un module *curse* ou *termcap* en Python ?"
#: ../Doc/faq/library.rst:96 #: ../Doc/faq/library.rst:96
msgid "" msgid ""
@ -158,44 +186,57 @@ msgid ""
"but there don't seem to be any currently maintained OSes that fall into this " "but there don't seem to be any currently maintained OSes that fall into this "
"category." "category."
msgstr "" msgstr ""
"Le module :mod:`curses` comprend les fonctionnalités de base de *curses* et "
"beaucoup de fonctionnalités supplémentaires provenant de *ncurses* et de "
"*SYSV curses* comme la couleur, la gestion des ensembles de caractères "
"alternatifs, la prise en charge du pavé tactile et de la souris. Cela "
"implique que le module n'est pas compatible avec des systèmes d'exploitation "
"qui n'ont que le *curses* de BSD mais, de nos jours, de tels systèmes "
"d'exploitation ne semblent plus exister ou être maintenus."
#: ../Doc/faq/library.rst:107 #: ../Doc/faq/library.rst:107
msgid "" msgid ""
"For Windows: use `the consolelib module <http://effbot.org/zone/console-" "For Windows: use `the consolelib module <http://effbot.org/zone/console-"
"index.htm>`_." "index.htm>`_."
msgstr "" msgstr ""
"Pour Windows : utilisez le module `consolelib <http://effbot.org/zone/"
"console-index.htm>`_."
#: ../Doc/faq/library.rst:112 #: ../Doc/faq/library.rst:112
msgid "Is there an equivalent to C's onexit() in Python?" msgid "Is there an equivalent to C's onexit() in Python?"
msgstr "" msgstr "Existe-t'il un équivalent à la fonction C ``onexit()`` en Python ?"
#: ../Doc/faq/library.rst:114 #: ../Doc/faq/library.rst:114
msgid "" msgid ""
"The :mod:`atexit` module provides a register function that is similar to " "The :mod:`atexit` module provides a register function that is similar to "
"C's :c:func:`onexit`." "C's :c:func:`onexit`."
msgstr "" msgstr ""
"Le module :mod:`atexit` fournit une fonction d'enregistrement similaire à la "
"fonction C :c:func:`onexit`."
#: ../Doc/faq/library.rst:119 #: ../Doc/faq/library.rst:119
msgid "Why don't my signal handlers work?" msgid "Why don't my signal handlers work?"
msgstr "" msgstr "Pourquoi mes gestionnaires de signaux ne fonctionnent-t'ils pas ?"
#: ../Doc/faq/library.rst:121 #: ../Doc/faq/library.rst:121
msgid "" msgid ""
"The most common problem is that the signal handler is declared with the " "The most common problem is that the signal handler is declared with the "
"wrong argument list. It is called as ::" "wrong argument list. It is called as ::"
msgstr "" msgstr ""
"Le problème le plus courant est d'appeler le gestionnaire de signaux avec "
"les mauvais arguments. Un gestionnaire est appelé de la façon suivante ::"
#: ../Doc/faq/library.rst:126 #: ../Doc/faq/library.rst:126
msgid "so it should be declared with two arguments::" msgid "so it should be declared with two arguments::"
msgstr "" msgstr "donc il doit être déclaré avec deux paramètres ::"
#: ../Doc/faq/library.rst:133 #: ../Doc/faq/library.rst:133
msgid "Common tasks" msgid "Common tasks"
msgstr "" msgstr "Tâches fréquentes"
#: ../Doc/faq/library.rst:136 #: ../Doc/faq/library.rst:136
msgid "How do I test a Python program or component?" msgid "How do I test a Python program or component?"
msgstr "" msgstr "Comment tester un programme ou un composant Python ?"
#: ../Doc/faq/library.rst:138 #: ../Doc/faq/library.rst:138
msgid "" msgid ""
@ -203,12 +244,17 @@ msgid ""
"examples in the docstrings for a module and runs them, comparing the output " "examples in the docstrings for a module and runs them, comparing the output "
"with the expected output given in the docstring." "with the expected output given in the docstring."
msgstr "" msgstr ""
"Python fournit deux cadriciels de test. Le module :mod:`doctest` cherche des "
"exemples dans les *docstrings* d'un module et les exécute. Il compare alors "
"la sortie avec la sortie attendue, telle que définie dans la *docstring*."
#: ../Doc/faq/library.rst:142 #: ../Doc/faq/library.rst:142
msgid "" msgid ""
"The :mod:`unittest` module is a fancier testing framework modelled on Java " "The :mod:`unittest` module is a fancier testing framework modelled on Java "
"and Smalltalk testing frameworks." "and Smalltalk testing frameworks."
msgstr "" msgstr ""
"Le module :mod:`unittest` est un cadriciel un peu plus élaboré basé sur les "
"cadriciels de test de Java et de Smalltalk."
#: ../Doc/faq/library.rst:145 #: ../Doc/faq/library.rst:145
msgid "" msgid ""
@ -220,14 +266,23 @@ msgid ""
"avoid depending on mutating global variables, since this makes testing much " "avoid depending on mutating global variables, since this makes testing much "
"more difficult to do." "more difficult to do."
msgstr "" msgstr ""
"Pour rendre le test plus aisé, il est nécessaire de bien découper le code "
"d'un programme. Votre programme doit avoir la quasi-totalité des "
"fonctionnalités dans des fonctions ou des classes — et ceci a parfois "
"l'avantage aussi plaisant qu'inattendu de rendre le programme plus rapide, "
"les accès aux variables locales étant en effet plus rapides que les accès "
"aux variables globales. De plus le programme doit éviter au maximum de "
"manipuler des variables globales, car ceci rend le test beaucoup plus "
"difficile."
#: ../Doc/faq/library.rst:153 #: ../Doc/faq/library.rst:153
msgid "The \"global main logic\" of your program may be as simple as ::" msgid "The \"global main logic\" of your program may be as simple as ::"
msgstr "" msgstr ""
"La « logique générale » d'un programme devrait être aussi simple que ::"
#: ../Doc/faq/library.rst:158 #: ../Doc/faq/library.rst:158
msgid "at the bottom of the main module of your program." msgid "at the bottom of the main module of your program."
msgstr "" msgstr "à la fin du module principal du programme."
#: ../Doc/faq/library.rst:160 #: ../Doc/faq/library.rst:160
msgid "" msgid ""
@ -240,12 +295,24 @@ msgid ""
"the \"production code\", since this makes it easy to find bugs and even " "the \"production code\", since this makes it easy to find bugs and even "
"design flaws earlier." "design flaws earlier."
msgstr "" msgstr ""
"Une fois que la logique du programme est implémentée par un ensemble de "
"fonctions et de comportements de classes, il faut écrire des fonctions de "
"test qui vont éprouver cette logique. À chaque module, il est possible "
"d'associer une suite de tests qui joue de manière automatique un ensemble de "
"tests. Au premier abord, il semble qu'il faille fournir un effort "
"conséquent, mais comme Python est un langage concis et flexible, c'est "
"surprenamment aisé. Écrire simultanément le code « de production » et les "
"fonctions de test associées rend le développement plus agréable et plus "
"amusant, car ceci permet de trouver des bogues, voire des défauts de "
"conception, plus facilement."
#: ../Doc/faq/library.rst:168 #: ../Doc/faq/library.rst:168
msgid "" msgid ""
"\"Support modules\" that are not intended to be the main module of a program " "\"Support modules\" that are not intended to be the main module of a program "
"may include a self-test of the module. ::" "may include a self-test of the module. ::"
msgstr "" msgstr ""
"Les « modules auxiliaires » qui n'ont pas vocation à être le module "
"principal du programme peuvent inclure un test pour se vérifier eux-mêmes. ::"
#: ../Doc/faq/library.rst:174 #: ../Doc/faq/library.rst:174
msgid "" msgid ""
@ -253,10 +320,13 @@ msgid ""
"when the external interfaces are unavailable by using \"fake\" interfaces " "when the external interfaces are unavailable by using \"fake\" interfaces "
"implemented in Python." "implemented in Python."
msgstr "" msgstr ""
"Les programmes qui interagissent avec des interfaces externes complexes "
"peuvent être testés même quand ces interfaces ne sont pas disponibles, en "
"utilisant des interfaces « simulacres » implémentées en Python."
#: ../Doc/faq/library.rst:180 #: ../Doc/faq/library.rst:180
msgid "How do I create documentation from doc strings?" msgid "How do I create documentation from doc strings?"
msgstr "" msgstr "Comment générer la documentation à partir des *docstrings* ?"
#: ../Doc/faq/library.rst:182 #: ../Doc/faq/library.rst:182
msgid "" msgid ""
@ -265,10 +335,15 @@ msgid ""
"docstrings is `epydoc <http://epydoc.sourceforge.net/>`_. `Sphinx <http://" "docstrings is `epydoc <http://epydoc.sourceforge.net/>`_. `Sphinx <http://"
"sphinx-doc.org>`_ can also include docstring content." "sphinx-doc.org>`_ can also include docstring content."
msgstr "" msgstr ""
"Le module :mod:`pydoc` peut générer du HTML à partir des *docstrings* du "
"code source Python. Il est aussi possible de documenter une API uniquement à "
"partir des *docstrings* à l'aide de `epydoc <http://epydoc.sourceforge.net/"
">`_. `Sphinx <http://sphinx-doc.org>`_ peut également inclure du contenu "
"provenant de *docstrings*."
#: ../Doc/faq/library.rst:189 #: ../Doc/faq/library.rst:189
msgid "How do I get a single keypress at a time?" msgid "How do I get a single keypress at a time?"
msgstr "" msgstr "Comment détecter qu'une touche est pressée ?"
#: ../Doc/faq/library.rst:191 #: ../Doc/faq/library.rst:191
msgid "" msgid ""
@ -294,11 +369,11 @@ msgstr ""
#: ../Doc/faq/library.rst:227 #: ../Doc/faq/library.rst:227
msgid "Threads" msgid "Threads"
msgstr "" msgstr "Fils d'exécution"
#: ../Doc/faq/library.rst:230 #: ../Doc/faq/library.rst:230
msgid "How do I program using threads?" msgid "How do I program using threads?"
msgstr "" msgstr "Comment programmer avec des fils d'exécution ?"
#: ../Doc/faq/library.rst:234 #: ../Doc/faq/library.rst:234
msgid "" msgid ""
@ -312,22 +387,29 @@ msgid ""
"Aahz has a set of slides from his threading tutorial that are helpful; see " "Aahz has a set of slides from his threading tutorial that are helpful; see "
"http://www.pythoncraft.com/OSCON2001/." "http://www.pythoncraft.com/OSCON2001/."
msgstr "" msgstr ""
"Un ensemble de diapositives issues du didacticiel de Aahz sur les fils "
"d'exécution est disponible à http://www.pythoncraft.com/OSCON2001/."
#: ../Doc/faq/library.rst:243 #: ../Doc/faq/library.rst:243
msgid "None of my threads seem to run: why?" msgid "None of my threads seem to run: why?"
msgstr "" msgstr "Aucun de mes fils ne semble s'exécuter : pourquoi ?"
#: ../Doc/faq/library.rst:245 #: ../Doc/faq/library.rst:245
msgid "" msgid ""
"As soon as the main thread exits, all threads are killed. Your main thread " "As soon as the main thread exits, all threads are killed. Your main thread "
"is running too quickly, giving the threads no time to do any work." "is running too quickly, giving the threads no time to do any work."
msgstr "" msgstr ""
"Dès que le fil d'exécution principal se termine, tous les fils sont tués. Le "
"fil principal s'exécute trop rapidement, sans laisser le temps aux autres "
"fils de faire quoi que ce soit."
#: ../Doc/faq/library.rst:248 #: ../Doc/faq/library.rst:248
msgid "" msgid ""
"A simple fix is to add a sleep to the end of the program that's long enough " "A simple fix is to add a sleep to the end of the program that's long enough "
"for all the threads to finish::" "for all the threads to finish::"
msgstr "" msgstr ""
"Une correction simple consiste à ajouter un temps d'attente suffisamment "
"long à la fin du programme pour que tous les fils puissent se terminer ::"
#: ../Doc/faq/library.rst:262 #: ../Doc/faq/library.rst:262
msgid "" msgid ""
@ -335,10 +417,16 @@ msgid ""
"run sequentially, one at a time! The reason is that the OS thread scheduler " "run sequentially, one at a time! The reason is that the OS thread scheduler "
"doesn't start a new thread until the previous thread is blocked." "doesn't start a new thread until the previous thread is blocked."
msgstr "" msgstr ""
"Mais à présent, sur beaucoup de plates-formes, les fils ne s'exécutent pas "
"en parallèle, mais semblent s'exécuter de manière séquentielle, l'un après "
"l'autre ! En réalité, l'ordonnanceur de fils du système d'exploitation ne "
"démarre pas de nouveau fil avant que le précédent ne soit bloqué."
#: ../Doc/faq/library.rst:266 #: ../Doc/faq/library.rst:266
msgid "A simple fix is to add a tiny sleep to the start of the run function::" msgid "A simple fix is to add a tiny sleep to the start of the run function::"
msgstr "" msgstr ""
"Une correction simple consiste à ajouter un petit temps d'attente au début "
"de la fonction ::"
#: ../Doc/faq/library.rst:278 #: ../Doc/faq/library.rst:278
msgid "" msgid ""
@ -352,6 +440,8 @@ msgstr ""
#: ../Doc/faq/library.rst:286 #: ../Doc/faq/library.rst:286
msgid "How do I parcel out work among a bunch of worker threads?" msgid "How do I parcel out work among a bunch of worker threads?"
msgstr "" msgstr ""
"Comment découper et répartir une tâche au sein d'un ensemble de fils "
"d'exécutions ?"
#: ../Doc/faq/library.rst:288 #: ../Doc/faq/library.rst:288
msgid "" msgid ""
@ -364,11 +454,11 @@ msgstr ""
#: ../Doc/faq/library.rst:294 #: ../Doc/faq/library.rst:294
msgid "Here's a trivial example::" msgid "Here's a trivial example::"
msgstr "" msgstr "Voici un exemple trivial ::"
#: ../Doc/faq/library.rst:332 #: ../Doc/faq/library.rst:332
msgid "When run, this will produce the following output:" msgid "When run, this will produce the following output:"
msgstr "" msgstr "Quand celui-ci est exécuté, il produit la sortie suivante :"
#: ../Doc/faq/library.rst:350 #: ../Doc/faq/library.rst:350
msgid "" msgid ""
@ -379,6 +469,8 @@ msgstr ""
#: ../Doc/faq/library.rst:355 #: ../Doc/faq/library.rst:355
msgid "What kinds of global value mutation are thread-safe?" msgid "What kinds of global value mutation are thread-safe?"
msgstr "" msgstr ""
"Quels types de mutations sur des variables globales sont compatibles avec "
"les programmes à fils d'exécution multiples ? sécurisé ?"
#: ../Doc/faq/library.rst:357 #: ../Doc/faq/library.rst:357
msgid "" msgid ""
@ -397,16 +489,24 @@ msgid ""
"shared variables of built-in data types (ints, lists, dicts, etc) that " "shared variables of built-in data types (ints, lists, dicts, etc) that "
"\"look atomic\" really are." "\"look atomic\" really are."
msgstr "" msgstr ""
"En théorie, cela veut dire qu'un décompte exact nécessite une connaissance "
"parfaite de l'implémentation de la MVP. En pratique, cela veut dire que les "
"opérations sur des variables partagées de type natif (les entier, les "
"listes, les dictionnaires etc.) qui « semblent atomiques » le sont "
"réellement."
#: ../Doc/faq/library.rst:369 #: ../Doc/faq/library.rst:369
msgid "" msgid ""
"For example, the following operations are all atomic (L, L1, L2 are lists, " "For example, the following operations are all atomic (L, L1, L2 are lists, "
"D, D1, D2 are dicts, x, y are objects, i, j are ints)::" "D, D1, D2 are dicts, x, y are objects, i, j are ints)::"
msgstr "" msgstr ""
"Par exemple, les opérations suivantes sont toutes atomiques (*L*, *L1* et "
"*L2* sont des listes, *D*, *D1* et *D2* sont des dictionnaires, *x* et *y* "
"sont des objets, *i* et *j* des entiers) ::"
#: ../Doc/faq/library.rst:384 #: ../Doc/faq/library.rst:384
msgid "These aren't::" msgid "These aren't::"
msgstr "" msgstr "Les suivantes ne le sont pas ::"
#: ../Doc/faq/library.rst:391 #: ../Doc/faq/library.rst:391
msgid "" msgid ""
@ -415,10 +515,15 @@ msgid ""
"affect things. This is especially true for the mass updates to dictionaries " "affect things. This is especially true for the mass updates to dictionaries "
"and lists. When in doubt, use a mutex!" "and lists. When in doubt, use a mutex!"
msgstr "" msgstr ""
"Les opérations qui remplacent d'autres objets peuvent invoquer la méthode :"
"meth:`__del__` de ces objets quand leur compteur de référence passe à zéro, "
"et cela peut avoir de l'impact. C'est tout particulièrement vrai pour les "
"des changements massifs sur des dictionnaires ou des listes. En cas de "
"doute, il vaut mieux utiliser un mutex."
#: ../Doc/faq/library.rst:398 #: ../Doc/faq/library.rst:398
msgid "Can't we get rid of the Global Interpreter Lock?" msgid "Can't we get rid of the Global Interpreter Lock?"
msgstr "" msgstr "Pourquoi ne pas se débarrasser du verrou global de l'interpréteur ?"
#: ../Doc/faq/library.rst:403 #: ../Doc/faq/library.rst:403
msgid "" msgid ""
@ -427,6 +532,12 @@ msgid ""
"multi-threaded Python program effectively only uses one CPU, due to the " "multi-threaded Python program effectively only uses one CPU, due to the "
"insistence that (almost) all Python code can only run while the GIL is held." "insistence that (almost) all Python code can only run while the GIL is held."
msgstr "" msgstr ""
"Le :term:`verrou global de l'interpréteur <global interpreter lock>` (GIL) "
"est souvent vu comme un obstacle au déploiement de code Python sur des "
"serveurs puissants avec de nombreux processeurs, car un programme Python à "
"fils d'exécutions multiples n'utilise en réalité qu'un seul processeur. "
"Presque tout le code Python ne peut en effet être exécuté qu'avec le GIL "
"acquis."
#: ../Doc/faq/library.rst:408 #: ../Doc/faq/library.rst:408
msgid "" msgid ""
@ -468,6 +579,15 @@ msgid ""
"types have their own free list; these free lists would have to be moved to " "types have their own free list; these free lists would have to be moved to "
"the interpreter state. And so on." "the interpreter state. And so on."
msgstr "" msgstr ""
"On a déjà proposé de restreindre le GIL par interpréteur, et non plus d'être "
"complétement global ; les interpréteurs ne seraient plus en mesure de "
"partager des objets. Malheureusement, cela n'a pas beaucoup de chance non "
"plus d'arriver. Cela nécessiterait un travail considérable, car la façon "
"dont beaucoup d'objets sont implémentés rend leur état global. Par exemple, "
"les entiers et les chaînes de caractères courts sont mis en cache ; ces "
"caches devraient être déplacés au niveau de l'interpréteur. D'autres objets "
"ont leur propre liste de suppression, ces listes devraient être déplacées au "
"niveau de l'interpréteur et ainsi de suite."
#: ../Doc/faq/library.rst:436 #: ../Doc/faq/library.rst:436
msgid "" msgid ""
@ -476,12 +596,19 @@ msgid ""
"extensions are being written at a faster rate than you can convert them to " "extensions are being written at a faster rate than you can convert them to "
"store all their global state in the interpreter state." "store all their global state in the interpreter state."
msgstr "" msgstr ""
"C'est une tâche sans fin, car les extensions tierces ont le même problème, "
"et il est probable que les extensions tierces soient développées plus vite "
"qu'il ne soit possible de les corriger pour les faire stocker leur état au "
"niveau de l'interpréteur et non plus au niveau global."
#: ../Doc/faq/library.rst:441 #: ../Doc/faq/library.rst:441
msgid "" msgid ""
"And finally, once you have multiple interpreters not sharing any state, what " "And finally, once you have multiple interpreters not sharing any state, what "
"have you gained over running each interpreter in a separate process?" "have you gained over running each interpreter in a separate process?"
msgstr "" msgstr ""
"Et enfin, quel intérêt y-a t'il à avoir plusieurs interpréteurs qui ne "
"partagent pas d'état, par rapport à faire tourner chaque interpréteur dans "
"un processus différent ?"
#: ../Doc/faq/library.rst:446 #: ../Doc/faq/library.rst:446
msgid "Input and Output" msgid "Input and Output"
@ -489,7 +616,7 @@ msgstr "Les entrées/sorties"
#: ../Doc/faq/library.rst:449 #: ../Doc/faq/library.rst:449
msgid "How do I delete a file? (And other file questions...)" msgid "How do I delete a file? (And other file questions...)"
msgstr "" msgstr "Comment supprimer un fichier ? (et autres questions sur les fichiers…)"
#: ../Doc/faq/library.rst:451 #: ../Doc/faq/library.rst:451
msgid "" msgid ""
@ -506,10 +633,16 @@ msgid ""
"directories as long as they're empty; if you want to delete an entire " "directories as long as they're empty; if you want to delete an entire "
"directory tree and its contents, use :func:`shutil.rmtree`." "directory tree and its contents, use :func:`shutil.rmtree`."
msgstr "" msgstr ""
"Utilisez :func:`os.rmdir` pour supprimer un dossier et :func:`os.mkdir` pour "
"en créer un nouveau. ``os.makedirs(chemin)`` crée les dossiers "
"intermédiaires de ``chemin`` qui n'existent pas et ``os.removedirs(chemin)`` "
"supprime les dossiers intermédiaires si ceux-ci sont vides. Pour supprimer "
"une arborescence et tout son contenu, utilisez :func:`shutil.rmtree`."
#: ../Doc/faq/library.rst:461 #: ../Doc/faq/library.rst:461
msgid "To rename a file, use ``os.rename(old_path, new_path)``." msgid "To rename a file, use ``os.rename(old_path, new_path)``."
msgstr "" msgstr ""
"``os.rename(ancien_chemin, nouveau_chemin)`` permet de renommer un fichier."
#: ../Doc/faq/library.rst:463 #: ../Doc/faq/library.rst:463
msgid "" msgid ""
@ -525,20 +658,26 @@ msgid ""
"files including :func:`~shutil.copyfile`, :func:`~shutil.copytree`, and :" "files including :func:`~shutil.copyfile`, :func:`~shutil.copytree`, and :"
"func:`~shutil.rmtree`." "func:`~shutil.rmtree`."
msgstr "" msgstr ""
"Le module :mod:`shutil` propose aussi un grand nombre de fonctions pour "
"effectuer des opérations sur des fichiers comme :func:`~shutil.copyfile`, :"
"func:`~shutil.copytree` et :func:`~shutil.rmtree`."
#: ../Doc/faq/library.rst:474 #: ../Doc/faq/library.rst:474
msgid "How do I copy a file?" msgid "How do I copy a file?"
msgstr "" msgstr "Comment copier un fichier ?"
#: ../Doc/faq/library.rst:476 #: ../Doc/faq/library.rst:476
msgid "" msgid ""
"The :mod:`shutil` module contains a :func:`~shutil.copyfile` function. Note " "The :mod:`shutil` module contains a :func:`~shutil.copyfile` function. Note "
"that on MacOS 9 it doesn't copy the resource fork and Finder info." "that on MacOS 9 it doesn't copy the resource fork and Finder info."
msgstr "" msgstr ""
"Le module :mod:`shutil` fournit la fonction :func:`~shutil.copyfile`. Sous "
"MacOS 9, celle-ci ne copie pas le clonage de ressources ni les informations "
"du chercheur."
#: ../Doc/faq/library.rst:481 #: ../Doc/faq/library.rst:481
msgid "How do I read (or write) binary data?" msgid "How do I read (or write) binary data?"
msgstr "" msgstr "Comment lire (ou écrire) des données binaires ?"
#: ../Doc/faq/library.rst:483 #: ../Doc/faq/library.rst:483
msgid "" msgid ""
@ -546,12 +685,18 @@ msgid ""
"`struct` module. It allows you to take a string containing binary data " "`struct` module. It allows you to take a string containing binary data "
"(usually numbers) and convert it to Python objects; and vice versa." "(usually numbers) and convert it to Python objects; and vice versa."
msgstr "" msgstr ""
"Pour lire ou écrire des formats de données complexes en binaire, il est "
"recommandé d'utiliser le module :mod:`struct`. Celui-ci permet de convertir "
"une chaîne de caractères qui contient des données binaires, souvent des "
"nombres, en objets Python, et vice-versa."
#: ../Doc/faq/library.rst:487 #: ../Doc/faq/library.rst:487
msgid "" msgid ""
"For example, the following code reads two 2-byte integers and one 4-byte " "For example, the following code reads two 2-byte integers and one 4-byte "
"integer in big-endian format from a file::" "integer in big-endian format from a file::"
msgstr "" msgstr ""
"Par exemple, le code suivant lit, depuis un fichier, deux entiers codés sur "
"2 octets et un entier codé sur 4 octets, en format gros-boutiste ::"
#: ../Doc/faq/library.rst:496 #: ../Doc/faq/library.rst:496
msgid "" msgid ""
@ -559,16 +704,24 @@ msgid ""
"one \"short integer\" (2 bytes), and 'l' reads one \"long integer\" (4 " "one \"short integer\" (2 bytes), and 'l' reads one \"long integer\" (4 "
"bytes) from the string." "bytes) from the string."
msgstr "" msgstr ""
"« > » dans la chaîne de formatage indique que la donnée doit être lue en "
"mode gros-boutiste, la lettre « h » indique un entier court (2 octets) et la "
"lettre « l » indique un entier long (4 octets)."
#: ../Doc/faq/library.rst:500 #: ../Doc/faq/library.rst:500
msgid "" msgid ""
"For data that is more regular (e.g. a homogeneous list of ints or floats), " "For data that is more regular (e.g. a homogeneous list of ints or floats), "
"you can also use the :mod:`array` module." "you can also use the :mod:`array` module."
msgstr "" msgstr ""
"Pour une donnée plus régulière (p. ex. une liste homogène d'entiers ou de "
"nombres à virgule flottante), il est possible d'utiliser le module :mod:"
"`array`."
#: ../Doc/faq/library.rst:505 #: ../Doc/faq/library.rst:505
msgid "I can't seem to use os.read() on a pipe created with os.popen(); why?" msgid "I can't seem to use os.read() on a pipe created with os.popen(); why?"
msgstr "" msgstr ""
"Il me semble impossible d'utiliser ``os.read()`` sur un tube créé avec ``os."
"popen()`` ; pourquoi ?"
#: ../Doc/faq/library.rst:507 #: ../Doc/faq/library.rst:507
msgid "" msgid ""
@ -578,6 +731,12 @@ msgid ""
"function. Thus, to read *n* bytes from a pipe *p* created with :func:`os." "function. Thus, to read *n* bytes from a pipe *p* created with :func:`os."
"popen`, you need to use ``p.read(n)``." "popen`, you need to use ``p.read(n)``."
msgstr "" msgstr ""
":func:`os.read` est une fonction de bas niveau qui prend en paramètre un "
"descripteur de fichier — un entier court qui représente le fichier ouvert. :"
"func:`os.popen` crée un objet fichier de haut niveau, du même type que celui "
"renvoyé par la fonction native :func:`open`. Par conséquent, pour lire *n* "
"octets d'un tube *p* créé avec :func:`os.popen`, il faut utiliser ``p."
"read(n)``."
#: ../Doc/faq/library.rst:515 #: ../Doc/faq/library.rst:515
msgid "" msgid ""
@ -642,27 +801,30 @@ msgstr ""
#: ../Doc/faq/library.rst:592 #: ../Doc/faq/library.rst:592
msgid "How do I access the serial (RS232) port?" msgid "How do I access the serial (RS232) port?"
msgstr "" msgstr "Comment accéder au port de transmission en série (RS-232) ?"
#: ../Doc/faq/library.rst:594 #: ../Doc/faq/library.rst:594
msgid "For Win32, POSIX (Linux, BSD, etc.), Jython:" msgid "For Win32, POSIX (Linux, BSD, etc.), Jython:"
msgstr "" msgstr "Pour Win32, POSIX (Linux, BSD, etc.) et Jython :"
#: ../Doc/faq/library.rst:596 #: ../Doc/faq/library.rst:596
msgid "http://pyserial.sourceforge.net" msgid "http://pyserial.sourceforge.net"
msgstr "" msgstr "http://pyserial.sourceforge.net"
#: ../Doc/faq/library.rst:598 #: ../Doc/faq/library.rst:598
msgid "For Unix, see a Usenet post by Mitch Chapman:" msgid "For Unix, see a Usenet post by Mitch Chapman:"
msgstr "" msgstr ""
"Pour Unix, référez-vous à une publication sur Usenet de Mitch Chapman :"
#: ../Doc/faq/library.rst:600 #: ../Doc/faq/library.rst:600
msgid "https://groups.google.com/groups?selm=34A04430.CF9@ohioee.com" msgid "https://groups.google.com/groups?selm=34A04430.CF9@ohioee.com"
msgstr "" msgstr "https://groups.google.com/groups?selm=34A04430.CF9@ohioee.com"
#: ../Doc/faq/library.rst:604 #: ../Doc/faq/library.rst:604
msgid "Why doesn't closing sys.stdout (stdin, stderr) really close it?" msgid "Why doesn't closing sys.stdout (stdin, stderr) really close it?"
msgstr "" msgstr ""
"Pourquoi fermer *sys.stdout*, *sys.stdin*, *sys.stderr* ne les ferme pas "
"réellement ?"
#: ../Doc/faq/library.rst:606 #: ../Doc/faq/library.rst:606
msgid "" msgid ""
@ -697,11 +859,11 @@ msgstr ""
#: ../Doc/faq/library.rst:631 #: ../Doc/faq/library.rst:631
msgid "Network/Internet Programming" msgid "Network/Internet Programming"
msgstr "" msgstr "Programmation réseau et Internet"
#: ../Doc/faq/library.rst:634 #: ../Doc/faq/library.rst:634
msgid "What WWW tools are there for Python?" msgid "What WWW tools are there for Python?"
msgstr "" msgstr "Quels sont les outils Python dédiés à la Toile ?"
#: ../Doc/faq/library.rst:636 #: ../Doc/faq/library.rst:636
msgid "" msgid ""
@ -709,28 +871,38 @@ msgid ""
"Reference Manual. Python has many modules that will help you build server-" "Reference Manual. Python has many modules that will help you build server-"
"side and client-side web systems." "side and client-side web systems."
msgstr "" msgstr ""
"Référez-vous aux chapitres intitulés :ref:`internet` et :ref:`netdata` dans "
"le manuel de référence de la bibliothèque. Python a de nombreux modules pour "
"construire des applications de Toile côté client comme côté serveur."
#: ../Doc/faq/library.rst:642 #: ../Doc/faq/library.rst:642
msgid "" msgid ""
"A summary of available frameworks is maintained by Paul Boddie at https://" "A summary of available frameworks is maintained by Paul Boddie at https://"
"wiki.python.org/moin/WebProgramming\\ ." "wiki.python.org/moin/WebProgramming\\ ."
msgstr "" msgstr ""
"Un résumé des cadriciels disponibles est maintenu par Paul Boddie à "
"l'adresse https://wiki.python.org/moin/WebProgramming\\ ."
#: ../Doc/faq/library.rst:645 #: ../Doc/faq/library.rst:645
msgid "" msgid ""
"Cameron Laird maintains a useful set of pages about Python web technologies " "Cameron Laird maintains a useful set of pages about Python web technologies "
"at http://phaseit.net/claird/comp.lang.python/web_python." "at http://phaseit.net/claird/comp.lang.python/web_python."
msgstr "" msgstr ""
"Cameron Laird maintient un ensemble intéressant d'articles sur les "
"technologies Python dédiées à la Toile à l'adresse http://phaseit.net/claird/"
"comp.lang.python/web_python."
#: ../Doc/faq/library.rst:650 #: ../Doc/faq/library.rst:650
msgid "How can I mimic CGI form submission (METHOD=POST)?" msgid "How can I mimic CGI form submission (METHOD=POST)?"
msgstr "" msgstr "Comment reproduire un envoi de formulaire CGI (METHOD=POST) ?"
#: ../Doc/faq/library.rst:652 #: ../Doc/faq/library.rst:652
msgid "" msgid ""
"I would like to retrieve web pages that are the result of POSTing a form. Is " "I would like to retrieve web pages that are the result of POSTing a form. Is "
"there existing code that would let me do this easily?" "there existing code that would let me do this easily?"
msgstr "" msgstr ""
"J'aimerais récupérer la page de retour d'un envoi de formulaire sur la "
"Toile. Existe-t'il déjà du code qui pourrait m'aider à le faire facilement ?"
#: ../Doc/faq/library.rst:655 #: ../Doc/faq/library.rst:655
msgid "Yes. Here's a simple example that uses httplib::" msgid "Yes. Here's a simple example that uses httplib::"
@ -745,27 +917,31 @@ msgstr ""
#: ../Doc/faq/library.rst:689 #: ../Doc/faq/library.rst:689
msgid "What module should I use to help with generating HTML?" msgid "What module should I use to help with generating HTML?"
msgstr "" msgstr "Quel module utiliser pour générer du HTML ?"
#: ../Doc/faq/library.rst:693 #: ../Doc/faq/library.rst:693
msgid "" msgid ""
"You can find a collection of useful links on the `Web Programming wiki page " "You can find a collection of useful links on the `Web Programming wiki page "
"<https://wiki.python.org/moin/WebProgramming>`_." "<https://wiki.python.org/moin/WebProgramming>`_."
msgstr "" msgstr ""
"La `page wiki de la programmation Toile <https://wiki.python.org/moin/"
"WebProgramming>`_ (en anglais) répertorie un ensemble de liens pertinents."
#: ../Doc/faq/library.rst:698 #: ../Doc/faq/library.rst:698
msgid "How do I send mail from a Python script?" msgid "How do I send mail from a Python script?"
msgstr "" msgstr "Comment envoyer un courriel avec un script Python ?"
#: ../Doc/faq/library.rst:700 #: ../Doc/faq/library.rst:700
msgid "Use the standard library module :mod:`smtplib`." msgid "Use the standard library module :mod:`smtplib`."
msgstr "" msgstr "Utilisez le module :mod:`smtplib` de la bibliothèque standard."
#: ../Doc/faq/library.rst:702 #: ../Doc/faq/library.rst:702
msgid "" msgid ""
"Here's a very simple interactive mail sender that uses it. This method will " "Here's a very simple interactive mail sender that uses it. This method will "
"work on any host that supports an SMTP listener. ::" "work on any host that supports an SMTP listener. ::"
msgstr "" msgstr ""
"Voici un exemple très simple d'un envoyeur de courriel qui l'utilise. Cette "
"méthode fonctionne sur tous les serveurs qui implémentent SMTP. ::"
#: ../Doc/faq/library.rst:722 #: ../Doc/faq/library.rst:722
msgid "" msgid ""
@ -774,10 +950,16 @@ msgid ""
"usr/sbin/sendmail``. The sendmail manual page will help you out. Here's " "usr/sbin/sendmail``. The sendmail manual page will help you out. Here's "
"some sample code::" "some sample code::"
msgstr "" msgstr ""
"Sous Unix, il est possible d'utiliser *sendmail*. La localisation de "
"l'exécutable *sendmail* dépend du système ; cela peut-être ``/usr/lib/"
"sendmail`` ou ``/usr/sbin/sendmail``, la page de manuel de *sendmail* peut "
"vous aider. Par exemple ::"
#: ../Doc/faq/library.rst:742 #: ../Doc/faq/library.rst:742
msgid "How do I avoid blocking in the connect() method of a socket?" msgid "How do I avoid blocking in the connect() method of a socket?"
msgstr "" msgstr ""
"Comment éviter de bloquer dans la méthode ``connect()`` d'un connecteur "
"réseau ?"
#: ../Doc/faq/library.rst:744 #: ../Doc/faq/library.rst:744
msgid "" msgid ""
@ -793,6 +975,13 @@ msgid ""
"progress, but hasn't finished yet. Different OSes will return different " "progress, but hasn't finished yet. Different OSes will return different "
"values, so you're going to have to check what's returned on your system." "values, so you're going to have to check what's returned on your system."
msgstr "" msgstr ""
"Pour empêcher une connexion TCP de se bloquer, il est possible de mettre le "
"connecteur en mode lecture seule. Avec cela, au moment du ``connect()``, la "
"connexion pourra être immédiate (peu probable) ou bien vous obtiendrez une "
"exception qui contient le numéro d'erreur dans ``.errno``. ``errno."
"EINPROGRESS`` indique que la connexion est en cours, mais qu'elle n'a pas "
"encore aboutie. La valeur dépend du système d'exploitation, donc renseignez-"
"vous sur la valeur utilisée par votre système."
#: ../Doc/faq/library.rst:753 #: ../Doc/faq/library.rst:753
msgid "" msgid ""
@ -804,11 +993,12 @@ msgstr ""
#: ../Doc/faq/library.rst:760 #: ../Doc/faq/library.rst:760
msgid "Databases" msgid "Databases"
msgstr "" msgstr "Bases de données"
#: ../Doc/faq/library.rst:763 #: ../Doc/faq/library.rst:763
msgid "Are there any interfaces to database packages in Python?" msgid "Are there any interfaces to database packages in Python?"
msgstr "" msgstr ""
"Existe-t'il des modules Python pour s'interfacer avec des bases de données ?"
#: ../Doc/faq/library.rst:765 #: ../Doc/faq/library.rst:765
msgid "Yes." msgid "Yes."
@ -827,10 +1017,13 @@ msgid ""
"`DatabaseProgramming wiki page <https://wiki.python.org/moin/" "`DatabaseProgramming wiki page <https://wiki.python.org/moin/"
"DatabaseProgramming>`_ for details." "DatabaseProgramming>`_ for details."
msgstr "" msgstr ""
"La gestion de la plupart des bases de données relationnelles est assurée. "
"Voir la page wiki `DatabaseProgramming <https://wiki.python.org/moin/"
"DatabaseProgramming>`_ pour plus de détails."
#: ../Doc/faq/library.rst:779 #: ../Doc/faq/library.rst:779
msgid "How do you implement persistent objects in Python?" msgid "How do you implement persistent objects in Python?"
msgstr "" msgstr "Comment implémenter la persistance d'objets en Python ?"
#: ../Doc/faq/library.rst:781 #: ../Doc/faq/library.rst:781
msgid "" msgid ""
@ -919,54 +1112,65 @@ msgstr ""
#: ../Doc/faq/library.rst:842 #: ../Doc/faq/library.rst:842
msgid "Mathematics and Numerics" msgid "Mathematics and Numerics"
msgstr "" msgstr "Mathématiques et calcul numérique"
#: ../Doc/faq/library.rst:845 #: ../Doc/faq/library.rst:845
msgid "How do I generate random numbers in Python?" msgid "How do I generate random numbers in Python?"
msgstr "" msgstr "Comment générer des nombres aléatoires en Python ?"
#: ../Doc/faq/library.rst:847 #: ../Doc/faq/library.rst:847
msgid "" msgid ""
"The standard module :mod:`random` implements a random number generator. " "The standard module :mod:`random` implements a random number generator. "
"Usage is simple::" "Usage is simple::"
msgstr "" msgstr ""
"Le module :mod:`random` de la bibliothèque standard comprend un générateur "
"de nombres aléatoires. Son utilisation est simple ::"
#: ../Doc/faq/library.rst:853 #: ../Doc/faq/library.rst:853
msgid "This returns a random floating point number in the range [0, 1)." msgid "This returns a random floating point number in the range [0, 1)."
msgstr "" msgstr ""
"Le code précédent renvoie un nombre à virgule flottante aléatoire dans "
"l'intervalle [0, 1[."
#: ../Doc/faq/library.rst:855 #: ../Doc/faq/library.rst:855
msgid "" msgid ""
"There are also many other specialized generators in this module, such as:" "There are also many other specialized generators in this module, such as:"
msgstr "" msgstr "Ce module fournit beaucoup d'autres générateurs spécialisés comme :"
#: ../Doc/faq/library.rst:857 #: ../Doc/faq/library.rst:857
msgid "``randrange(a, b)`` chooses an integer in the range [a, b)." msgid "``randrange(a, b)`` chooses an integer in the range [a, b)."
msgstr "" msgstr "``randrange(a, b)`` génère un entier dans l'intervalle [a, b[."
#: ../Doc/faq/library.rst:858 #: ../Doc/faq/library.rst:858
msgid "``uniform(a, b)`` chooses a floating point number in the range [a, b)." msgid "``uniform(a, b)`` chooses a floating point number in the range [a, b)."
msgstr "" msgstr ""
"``uniform(a, b)`` génère un nombre à virgule flottante aléatoire dans "
"l'intervalle [a, b[."
#: ../Doc/faq/library.rst:859 #: ../Doc/faq/library.rst:859
msgid "" msgid ""
"``normalvariate(mean, sdev)`` samples the normal (Gaussian) distribution." "``normalvariate(mean, sdev)`` samples the normal (Gaussian) distribution."
msgstr "" msgstr "``normalvariate(mean, sdev)`` simule la loi normale (Gaussienne)."
#: ../Doc/faq/library.rst:861 #: ../Doc/faq/library.rst:861
msgid "Some higher-level functions operate on sequences directly, such as:" msgid "Some higher-level functions operate on sequences directly, such as:"
msgstr "" msgstr ""
"Des fonctions de haut niveau opèrent directement sur des séquences comme :"
#: ../Doc/faq/library.rst:863 #: ../Doc/faq/library.rst:863
msgid "``choice(S)`` chooses random element from a given sequence" msgid "``choice(S)`` chooses random element from a given sequence"
msgstr "" msgstr "``choice(S)`` sélectionne au hasard un élément d'une séquence donnée"
#: ../Doc/faq/library.rst:864 #: ../Doc/faq/library.rst:864
msgid "``shuffle(L)`` shuffles a list in-place, i.e. permutes it randomly" msgid "``shuffle(L)`` shuffles a list in-place, i.e. permutes it randomly"
msgstr "" msgstr ""
"``shuffle(L)`` mélange une liste en-place, c-à-d lui applique une "
"permutation aléatoire"
#: ../Doc/faq/library.rst:866 #: ../Doc/faq/library.rst:866
msgid "" msgid ""
"There's also a ``Random`` class you can instantiate to create independent " "There's also a ``Random`` class you can instantiate to create independent "
"multiple random number generators." "multiple random number generators."
msgstr "" msgstr ""
"Il existe aussi une classe ``Random`` qu'il est possible d'instancier pour "
"créer des générateurs aléatoires indépendants."

File diff suppressed because it is too large Load Diff

View File

@ -295,16 +295,26 @@ msgid ""
"``__declspec(dllexport)``. In a .pyd, linkage is defined in a list of " "``__declspec(dllexport)``. In a .pyd, linkage is defined in a list of "
"available functions." "available functions."
msgstr "" msgstr ""
"Notez que le chemin de recherche pour *foo.pyd* est *PYTHONPATH*, il est "
"différent de celui qu'utilise Windows pour rechercher *foo.dll*. De plus, "
"*foo.pyd* n'a pas besoin d'être présent pour que votre programme s'exécute "
"alors que si vous avez lié votre programme avec une *dll* celle-ci est "
"requise. Bien sûr *foo.pyd* est nécessaire si vous écrivez ``import foo``. "
"Dans une *DLL* le lien est déclaré dans le code source avec "
"``__declspec(dllexport)``. Dans un *.pyd* la liaison est définie dans une "
"liste de fonctions disponibles."
#: ../Doc/faq/windows.rst:193 #: ../Doc/faq/windows.rst:193
msgid "How can I embed Python into a Windows application?" msgid "How can I embed Python into a Windows application?"
msgstr "" msgstr "Comment puis-je intégrer Python dans une application Windows ?"
#: ../Doc/faq/windows.rst:195 #: ../Doc/faq/windows.rst:195
msgid "" msgid ""
"Embedding the Python interpreter in a Windows app can be summarized as " "Embedding the Python interpreter in a Windows app can be summarized as "
"follows:" "follows:"
msgstr "" msgstr ""
"L'intégration de l'interpréteur Python dans une application Windows peut se "
"résumer comme suit :"
#: ../Doc/faq/windows.rst:197 #: ../Doc/faq/windows.rst:197
msgid "" msgid ""
@ -323,6 +333,12 @@ msgid ""
"the so-called \"import lib\" corresponding to :file:`python{NN}.dll`. It " "the so-called \"import lib\" corresponding to :file:`python{NN}.dll`. It "
"merely defines symbols for the linker.)" "merely defines symbols for the linker.)"
msgstr "" msgstr ""
"Vous pouvez créer un lien vers Python de deux manières différentes. Un lien "
"au moment du chargement signifie pointer vers :file:`python{NN}.lib`, tandis "
"qu'un lien au moment de l'exécution signifie pointer vers :file:`python{NN}."
"dll`. (Note générale : :file:`python{NN}.lib` est le soi-disant « *import "
"lib* » correspondant à :file:`python{NN}.dll`. Il définit simplement des "
"liens symboliques pour l'éditeur de liens.)"
#: ../Doc/faq/windows.rst:209 #: ../Doc/faq/windows.rst:209
msgid "" msgid ""
@ -334,12 +350,22 @@ msgid ""
"these pointers transparent to any C code that calls routines in Python's C " "these pointers transparent to any C code that calls routines in Python's C "
"API." "API."
msgstr "" msgstr ""
"La liaison en temps réel simplifie grandement les options de liaison ; tout "
"se passe au moment de l'exécution. Votre code doit charger :file:"
"`python{NN}.dll` en utilisant la routine Windows ``LoadLibraryEx()``. Le "
"code doit aussi utiliser des routines d'accès et des données dans :file:"
"`python{NN}.dll` (c'est-à-dire les API C de Python) en utilisant des "
"pointeurs obtenus par la routine Windows ``GetProcAddress()``. Les macros "
"peuvent rendre l'utilisation de ces pointeurs transparente à tout code C qui "
"appelle des routines dans l'API C de Python."
#: ../Doc/faq/windows.rst:216 #: ../Doc/faq/windows.rst:216
msgid "" msgid ""
"Borland note: convert :file:`python{NN}.lib` to OMF format using Coff2Omf." "Borland note: convert :file:`python{NN}.lib` to OMF format using Coff2Omf."
"exe first." "exe first."
msgstr "" msgstr ""
"Note Borland : convertir :file:`python{NN}.lib` au format OMF en utilisant "
"*Coff2Omf.exe* en premier."
#: ../Doc/faq/windows.rst:221 #: ../Doc/faq/windows.rst:221
msgid "" msgid ""
@ -349,6 +375,12 @@ msgid ""
"link *into* your .exe file (!) You do _not_ have to create a DLL file, and " "link *into* your .exe file (!) You do _not_ have to create a DLL file, and "
"this also simplifies linking." "this also simplifies linking."
msgstr "" msgstr ""
"Si vous utilisez SWIG, il est facile de créer un « module d'extension » "
"Python qui rendra les données et les méthodes de l'application disponibles "
"pour Python. SWIG s'occupera de tous les détails ennuyeux pour vous. Le "
"résultat est du code C que vous liez *dans* votre *fichier.exe* (!) Vous "
"n'avez _pas_ besoin de créer un fichier DLL, et cela simplifie également la "
"liaison."
#: ../Doc/faq/windows.rst:227 #: ../Doc/faq/windows.rst:227
msgid "" msgid ""
@ -358,6 +390,12 @@ msgid ""
"classes, as you should, the init function will be called initleoc(). This " "classes, as you should, the init function will be called initleoc(). This "
"initializes a mostly hidden helper class used by the shadow class." "initializes a mostly hidden helper class used by the shadow class."
msgstr "" msgstr ""
"SWIG va créer une fonction d'initialisation (fonction en C) dont le nom "
"dépend du nom du module d'extension. Par exemple, si le nom du module est "
"*leo*, la fonction *init* sera appelée *initleo()*. Si vous utilisez des "
"classes *shadow* SWIG, comme vous le devriez, la fonction *init* sera "
"appelée *initleoc()*. Ceci initialise une classe auxiliaire invisible "
"utilisée par la classe *shadow*."
#: ../Doc/faq/windows.rst:233 #: ../Doc/faq/windows.rst:233
msgid "" msgid ""
@ -365,18 +403,26 @@ msgid ""
"calling the initialization function is equivalent to importing the module " "calling the initialization function is equivalent to importing the module "
"into Python! (This is the second key undocumented fact.)" "into Python! (This is the second key undocumented fact.)"
msgstr "" msgstr ""
"La raison pour laquelle vous pouvez lier le code C à l'étape 2 dans votre "
"*fichier.exe* est que l'appel de la fonction d'initialisation équivaut à "
"importer le module dans Python ! (C'est le deuxième fait clé non documenté.)"
#: ../Doc/faq/windows.rst:237 #: ../Doc/faq/windows.rst:237
msgid "" msgid ""
"In short, you can use the following code to initialize the Python " "In short, you can use the following code to initialize the Python "
"interpreter with your extension module." "interpreter with your extension module."
msgstr "" msgstr ""
"En bref, vous pouvez utiliser le code suivant pour initialiser "
"l'interpréteur Python avec votre module d'extension."
#: ../Doc/faq/windows.rst:248 #: ../Doc/faq/windows.rst:248
msgid "" msgid ""
"There are two problems with Python's C API which will become apparent if you " "There are two problems with Python's C API which will become apparent if you "
"use a compiler other than MSVC, the compiler used to build pythonNN.dll." "use a compiler other than MSVC, the compiler used to build pythonNN.dll."
msgstr "" msgstr ""
"Il y a deux problèmes avec l'API C de Python qui apparaîtront si vous "
"utilisez un compilateur autre que MSVC, le compilateur utilisé pour "
"construire *pythonNN.dll*."
#: ../Doc/faq/windows.rst:251 #: ../Doc/faq/windows.rst:251
msgid "" msgid ""
@ -385,12 +431,19 @@ msgid ""
"compiler's notion of a struct FILE will be different. From an " "compiler's notion of a struct FILE will be different. From an "
"implementation standpoint these are very _low_ level functions." "implementation standpoint these are very _low_ level functions."
msgstr "" msgstr ""
"Problème 1 : Les fonctions dites de \"Très Haut Niveau\" qui prennent les "
"arguments FILE * ne fonctionneront pas dans un environnement multi-"
"compilateur car chaque compilateur aura une notion différente de la "
"structure de FILE. Du point de vue de l'implémentation, il s'agit de "
"fonctions de très bas niveau."
#: ../Doc/faq/windows.rst:256 #: ../Doc/faq/windows.rst:256
msgid "" msgid ""
"Problem 2: SWIG generates the following code when generating wrappers to " "Problem 2: SWIG generates the following code when generating wrappers to "
"void functions:" "void functions:"
msgstr "" msgstr ""
"Problème 2 : SWIG génère le code suivant lors de la génération "
"*d'encapsuleurs* pour annuler les fonctions :"
#: ../Doc/faq/windows.rst:265 #: ../Doc/faq/windows.rst:265
msgid "" msgid ""
@ -398,6 +451,10 @@ msgid ""
"structure called _Py_NoneStruct inside pythonNN.dll. Again, this code will " "structure called _Py_NoneStruct inside pythonNN.dll. Again, this code will "
"fail in a mult-compiler environment. Replace such code by:" "fail in a mult-compiler environment. Replace such code by:"
msgstr "" msgstr ""
"Hélas, *Py_None* est une macro qui se développe en référence à une structure "
"de données complexe appelée *_Py_NoneStruct* dans *pythonNN.dll*. Encore "
"une fois, ce code échouera dans un environnement multi-compilateur. "
"Remplacez ce code par :"
#: ../Doc/faq/windows.rst:273 #: ../Doc/faq/windows.rst:273
msgid "" msgid ""
@ -405,6 +462,9 @@ msgid ""
"automatically, though I have not been able to get this to work (I'm a " "automatically, though I have not been able to get this to work (I'm a "
"complete SWIG newbie)." "complete SWIG newbie)."
msgstr "" msgstr ""
"Il est possible d'utiliser la commande ``%typemap`` de SWIG pour effectuer "
"le changement automatiquement, bien que je n'ai pas réussi à le faire "
"fonctionner (je suis un débutant complet avec SWIG)."
#: ../Doc/faq/windows.rst:277 #: ../Doc/faq/windows.rst:277
msgid "" msgid ""
@ -417,6 +477,15 @@ msgid ""
"is a Python object (defined in your extension module) that contains read() " "is a Python object (defined in your extension module) that contains read() "
"and write() methods." "and write() methods."
msgstr "" msgstr ""
"Utiliser un script shell Python pour créer une fenêtre d'interpréteur Python "
"depuis votre application Windows n'est pas une bonne idée ; la fenêtre "
"résultante sera indépendante du système de fenêtrage de votre application. "
"Vous (ou la classe *wxPythonWindow*) devriez plutôt créer une fenêtre "
"d'interpréteur « native ». Il est facile de connecter cette fenêtre à "
"l'interpréteur Python. Vous pouvez rediriger l'entrée/sortie de Python vers "
"*n'importe quel* objet qui supporte la lecture et l'écriture, donc tout ce "
"dont vous avez besoin est un objet Python (défini dans votre module "
"d'extension) qui contient les méthodes *read()* et *write()*."
#: ../Doc/faq/windows.rst:286 #: ../Doc/faq/windows.rst:286
msgid "How do I keep editors from inserting tabs into my Python source?" msgid "How do I keep editors from inserting tabs into my Python source?"

View File

@ -18,7 +18,7 @@ msgstr ""
#: ../Doc/howto/cporting.rst:7 #: ../Doc/howto/cporting.rst:7
msgid "Porting Extension Modules to Python 3" msgid "Porting Extension Modules to Python 3"
msgstr "" msgstr "Portage des modules d'extension vers Python 3"
#: ../Doc/howto/cporting.rst:9 #: ../Doc/howto/cporting.rst:9
msgid "Benjamin Peterson" msgid "Benjamin Peterson"
@ -36,6 +36,12 @@ msgid ""
"obvious on the C level. This document endeavors to document " "obvious on the C level. This document endeavors to document "
"incompatibilities and how they can be worked around." "incompatibilities and how they can be worked around."
msgstr "" msgstr ""
"Changer l'API C n'était pas l'un des objectifs de Python 3, cependant les "
"nombreux changements au niveau Python ont rendu impossible de garder l'API "
"de Python 2 comme elle était. Certains changements tels que l'unification "
"de :func:`int` et :func:`long` sont plus apparents au niveau C. Ce document "
"s'efforce de documenter les incompatibilités et la façon dont elles peuvent "
"être contournées."
#: ../Doc/howto/cporting.rst:23 #: ../Doc/howto/cporting.rst:23
msgid "Conditional compilation" msgid "Conditional compilation"
@ -46,26 +52,33 @@ msgid ""
"The easiest way to compile only some code for Python 3 is to check if :c:" "The easiest way to compile only some code for Python 3 is to check if :c:"
"macro:`PY_MAJOR_VERSION` is greater than or equal to 3. ::" "macro:`PY_MAJOR_VERSION` is greater than or equal to 3. ::"
msgstr "" msgstr ""
"La façon la plus simple de compiler seulement une section de code pour "
"Python 3 est de vérifier si :c:macro:`PY_MAJOR_VERSION` est supérieur ou "
"égal à 3. ::"
#: ../Doc/howto/cporting.rst:32 #: ../Doc/howto/cporting.rst:32
msgid "" msgid ""
"API functions that are not present can be aliased to their equivalents " "API functions that are not present can be aliased to their equivalents "
"within conditional blocks." "within conditional blocks."
msgstr "" msgstr ""
"Les fonctions manquantes dans l'API peuvent être remplacées par des alias à "
"leurs équivalents dans des blocs conditionnels."
#: ../Doc/howto/cporting.rst:37 #: ../Doc/howto/cporting.rst:37
msgid "Changes to Object APIs" msgid "Changes to Object APIs"
msgstr "" msgstr "Modifications apportées aux API des objets"
#: ../Doc/howto/cporting.rst:39 #: ../Doc/howto/cporting.rst:39
msgid "" msgid ""
"Python 3 merged together some types with similar functions while cleanly " "Python 3 merged together some types with similar functions while cleanly "
"separating others." "separating others."
msgstr "" msgstr ""
"Python 3 a fusionné certains types avec des fonctions identiques tout en "
"séparant de façon propre, d'autres."
#: ../Doc/howto/cporting.rst:44 #: ../Doc/howto/cporting.rst:44
msgid "str/unicode Unification" msgid "str/unicode Unification"
msgstr "" msgstr "Unification de *str* et *unicode*"
#: ../Doc/howto/cporting.rst:46 #: ../Doc/howto/cporting.rst:46
msgid "" msgid ""
@ -81,10 +94,23 @@ msgid ""
"shows best practices with regards to :c:type:`PyUnicode`, :c:type:" "shows best practices with regards to :c:type:`PyUnicode`, :c:type:"
"`PyString`, and :c:type:`PyBytes`. ::" "`PyString`, and :c:type:`PyBytes`. ::"
msgstr "" msgstr ""
"Le type :func:`str` de Python 3 est l'équivalent de :func:`unicode` sous "
"Python 2 ; Les fonctions C sont appelées ``PyUnicode_*`` pour les deux "
"versions. L'ancien type de chaîne de caractères de 8 bits est devenue :func:"
"`bytes`, avec des fonctions C nommées ``PyBytes_*``. Python 2.6 et toutes "
"les versions supérieures fournissent un en-tête de compatibilité, :file:"
"`bytesobject.h`, faisant correspondre les noms ``PyBytes`` aux ``PyString``. "
"Pour une meilleure compatibilité avec Python 3, :c:type:`PyUnicode` doit "
"être utilisé seulement pour des données textuelles et :c:type:`PyBytes` pour "
"des données binaires. Il est important de noter que :c:type:`PyBytes` et :c:"
"type:`PyUnicode` en Python 3 ne sont pas remplaçables contrairement à :c:"
"type:`PyString` et :c:type:`PyUnicode` dans Python 2. L'exemple suivant "
"montre l'utilisation optimale de :c:type:`PyUnicode`, :c:type:`PyString`, "
"et :c:type:`PyBytes`. ::"
#: ../Doc/howto/cporting.rst:95 #: ../Doc/howto/cporting.rst:95
msgid "long/int Unification" msgid "long/int Unification"
msgstr "" msgstr "Unification de *long* et *int*"
#: ../Doc/howto/cporting.rst:97 #: ../Doc/howto/cporting.rst:97
msgid "" msgid ""
@ -96,7 +122,7 @@ msgstr ""
#: ../Doc/howto/cporting.rst:104 #: ../Doc/howto/cporting.rst:104
msgid "Module initialization and state" msgid "Module initialization and state"
msgstr "" msgstr "Initialisation et état du module"
#: ../Doc/howto/cporting.rst:106 #: ../Doc/howto/cporting.rst:106
msgid "" msgid ""
@ -106,10 +132,16 @@ msgid ""
"in both Python 2 and Python 3 is tricky. The following simple example " "in both Python 2 and Python 3 is tricky. The following simple example "
"demonstrates how. ::" "demonstrates how. ::"
msgstr "" msgstr ""
"Python 3 a remanié son système d'initialisation des modules d'extension "
"(Voir :pep:`3121`.). Au lieu de stocker les états de module dans les "
"variables globales, les états doivent être stockés dans une structure "
"spécifique à l'interpréteur. Créer des modules qui ont un fonctionnement "
"correct en Python 2 et Python 3 est délicat. L'exemple suivant montre "
"comment. ::"
#: ../Doc/howto/cporting.rst:197 #: ../Doc/howto/cporting.rst:197
msgid "CObject replaced with Capsule" msgid "CObject replaced with Capsule"
msgstr "" msgstr "CObject remplacé par Capsule"
#: ../Doc/howto/cporting.rst:199 #: ../Doc/howto/cporting.rst:199
msgid "" msgid ""
@ -120,6 +152,13 @@ msgid ""
"APIs relied on undefined behavior in C. (For further reading on the " "APIs relied on undefined behavior in C. (For further reading on the "
"rationale behind Capsules, please see :issue:`5630`.)" "rationale behind Capsules, please see :issue:`5630`.)"
msgstr "" msgstr ""
"L'objet :c:type:`Capsule` a été introduit dans Python 3.1 et 2.7 pour "
"remplacer :c:type:`CObject`. Le type :c:type:`CObject` était utile, mais son "
"API posait des soucis : elle ne permettait pas la distinction entre les "
"objets C valides, ce qui permettait aux objets C assortis incorrectement de "
"planter l'interpréteur, et certaines des API s'appuyaient sur un "
"comportement indéfini en C. (Pour plus de détails sur la logique de "
"Capsules, veuillez consulter :issue:`5630`)."
#: ../Doc/howto/cporting.rst:206 #: ../Doc/howto/cporting.rst:206
msgid "" msgid ""
@ -131,6 +170,14 @@ msgid ""
"support both CObjects and Capsules. (Note that Python 3.0 is no longer " "support both CObjects and Capsules. (Note that Python 3.0 is no longer "
"supported, and it is not recommended for production use.)" "supported, and it is not recommended for production use.)"
msgstr "" msgstr ""
"Si vous utilisez actuellement CObjects et que vous voulez migrer vers la "
"version 3.1 ou plus récente, vous devrez passer à Capsules. :c:type:"
"`CObject` est déprécié dans 3.1 et 2.7 et est supprimé dans Python 3.2. Si "
"vous ne gérez que les versions 2.7, ou 3.1 et supérieures, vous pouvez "
"simplement passer à :c:type:`Capsule`. Si vous avez besoin de gérer Python "
"3.0, ou des versions de Python antérieures à 2.7, vous devez gérer CObjects "
"et Capsules. (Notez que Python 3.0 n'est plus maintenu, et qu'il n'est pas "
"recommandé pour une utilisation en production)."
#: ../Doc/howto/cporting.rst:216 #: ../Doc/howto/cporting.rst:216
msgid "" msgid ""
@ -140,6 +187,11 @@ msgid ""
"automatically use Capsules in versions of Python with Capsules, and switch " "automatically use Capsules in versions of Python with Capsules, and switch "
"to CObjects when Capsules are unavailable." "to CObjects when Capsules are unavailable."
msgstr "" msgstr ""
"L'exemple suivant d'en-tête de fichier :file:`capsulethunk.h` peut résoudre "
"le problème. Il suffit d'écrire votre code dans l'API :c:type:`Capsule` et "
"d'inclure ce fichier d'en-tête après :file:`Python.h`. Votre code utilisera "
"automatiquement Capsules dans les versions de Python avec Capsules, et "
"passera à CObjects lorsque les Capsules ne sont pas disponibles."
#: ../Doc/howto/cporting.rst:223 #: ../Doc/howto/cporting.rst:223
msgid "" msgid ""
@ -148,10 +200,15 @@ msgid ""
"the simulated :c:type:`Capsule` objects created by :file:`capsulethunk.h` " "the simulated :c:type:`Capsule` objects created by :file:`capsulethunk.h` "
"behave slightly differently from real Capsules. Specifically:" "behave slightly differently from real Capsules. Specifically:"
msgstr "" msgstr ""
":file:`capsulethunk.h` reproduit le fonctionnement de Capsules en utilisant "
"CObjects. Cependant, :c:type:`CObject` ne permet pas de stocker le \"nom\" "
"de la capsule. Les objets simulés :c:type:`Capsule` créés par :file:"
"`capsulethunk.h` se comportent légèrement différemment des véritables "
"Capsules. Ainsi :"
#: ../Doc/howto/cporting.rst:228 #: ../Doc/howto/cporting.rst:228
msgid "The name parameter passed in to :c:func:`PyCapsule_New` is ignored." msgid "The name parameter passed in to :c:func:`PyCapsule_New` is ignored."
msgstr "" msgstr "Le paramètre *name* passé à :c:func:`PyCapsule_New` est ignoré."
#: ../Doc/howto/cporting.rst:230 #: ../Doc/howto/cporting.rst:230
msgid "" msgid ""
@ -159,10 +216,13 @@ msgid ""
"`PyCapsule_GetPointer` is ignored, and no error checking of the name is " "`PyCapsule_GetPointer` is ignored, and no error checking of the name is "
"performed." "performed."
msgstr "" msgstr ""
"Le paramètre *name* passé à :c:func:`PyCapsule_IsValid` et :c:func:"
"`PyCapsule_GetPointer` est ignoré et il n'y a pas de vérification d'erreur "
"du nom."
#: ../Doc/howto/cporting.rst:234 #: ../Doc/howto/cporting.rst:234
msgid ":c:func:`PyCapsule_GetName` always returns NULL." msgid ":c:func:`PyCapsule_GetName` always returns NULL."
msgstr "" msgstr ":c:func:`PyCapsule_GetName` renvoie toujours un NULL."
#: ../Doc/howto/cporting.rst:236 #: ../Doc/howto/cporting.rst:236
msgid "" msgid ""
@ -171,6 +231,11 @@ msgid ""
"`PyCapsule_SetName` was deemed preferable to silent failure here. If this " "`PyCapsule_SetName` was deemed preferable to silent failure here. If this "
"is inconvenient, feel free to modify your local copy as you see fit.)" "is inconvenient, feel free to modify your local copy as you see fit.)"
msgstr "" msgstr ""
":c:func:`PyCapsule_SetName` lève toujours une exception et renvoie un échec. "
"Note : Puisqu'il n'y a aucun moyen de stocker un nom dans un CObject, "
"l'échec verbeux de :c:func:`PyCapsule_SetName` a été jugé préférable à un "
"échec non-verbeux dans ce cas. Si cela ne vous convenait pas, vous pouvez "
"modifier votre copie locale selon vos besoins."
#: ../Doc/howto/cporting.rst:243 #: ../Doc/howto/cporting.rst:243
msgid "" msgid ""
@ -178,10 +243,13 @@ msgid ""
"source:`Doc/includes/capsulethunk.h`. We also include it here for your " "source:`Doc/includes/capsulethunk.h`. We also include it here for your "
"convenience:" "convenience:"
msgstr "" msgstr ""
"Vous pouvez trouver :file:`capsulethunk.h` dans la distribution source de "
"Python comme :source:`Doc/includes/capsulethunk.h`. Nous l'incluons ici pour "
"votre confort :"
#: ../Doc/howto/cporting.rst:252 #: ../Doc/howto/cporting.rst:252
msgid "Other options" msgid "Other options"
msgstr "" msgstr "Autres options"
#: ../Doc/howto/cporting.rst:254 #: ../Doc/howto/cporting.rst:254
msgid "" msgid ""
@ -189,3 +257,7 @@ msgid ""
"<http://cython.org/>`_. It translates a Python-like language to C. The " "<http://cython.org/>`_. It translates a Python-like language to C. The "
"extension modules it creates are compatible with Python 3 and Python 2." "extension modules it creates are compatible with Python 3 and Python 2."
msgstr "" msgstr ""
"Si vous écrivez un nouveau module d'extension, vous pouvez envisager "
"d'utiliser `Cython <http://cython.org/>`_. Il traduit un langage de type "
"Python en C. Les modules d'extension qu'il crée sont compatibles avec Python "
"3 et Python 2."

File diff suppressed because it is too large Load Diff

View File

@ -1041,6 +1041,8 @@ msgid ""
"Creating a logging config file and reading it using the :func:`fileConfig` " "Creating a logging config file and reading it using the :func:`fileConfig` "
"function." "function."
msgstr "" msgstr ""
"Créer un fichier de configuration de `logging` et le lire en employant la "
"fonction :func:`fileConfig`."
#: ../Doc/howto/logging.rst:559 #: ../Doc/howto/logging.rst:559
msgid "" msgid ""
@ -1481,6 +1483,9 @@ msgid ""
":class:`~handlers.TimedRotatingFileHandler` instances send messages to disk " ":class:`~handlers.TimedRotatingFileHandler` instances send messages to disk "
"files, rotating the log file at certain timed intervals." "files, rotating the log file at certain timed intervals."
msgstr "" msgstr ""
"Les instances de :class:`~handlers.TimedRotatingFileHandler` envoient des "
"messages aux fichiers de disque, en permutant le fichier journal à "
"intervalles réguliers."
#: ../Doc/howto/logging.rst:887 #: ../Doc/howto/logging.rst:887
msgid "" msgid ""

View File

@ -18,11 +18,11 @@ msgstr ""
#: ../Doc/howto/pyporting.rst:5 #: ../Doc/howto/pyporting.rst:5
msgid "Porting Python 2 Code to Python 3" msgid "Porting Python 2 Code to Python 3"
msgstr "" msgstr "Portage de code Python 2 vers Python 3"
#: ../Doc/howto/pyporting.rst:7 #: ../Doc/howto/pyporting.rst:7
msgid "Brett Cannon" msgid "Brett Cannon"
msgstr "" msgstr "Brett Cannon"
#: ../Doc/howto/pyporting.rst:0 #: ../Doc/howto/pyporting.rst:0
msgid "Abstract" msgid "Abstract"
@ -35,12 +35,18 @@ msgid ""
"Python. This guide is meant to help you figure out how best to support both " "Python. This guide is meant to help you figure out how best to support both "
"Python 2 & 3 simultaneously." "Python 2 & 3 simultaneously."
msgstr "" msgstr ""
"Python 3 étant le futur de Python tandis que Python 2 est encore activement "
"utilisé, il est préférable de faire en sorte que votre projet soit "
"disponible pour les deux versions majeures de Python. Ce guide est destiné à "
"vous aider à comprendre comment gérer simultanément Python 2 & 3."
#: ../Doc/howto/pyporting.rst:16 #: ../Doc/howto/pyporting.rst:16
msgid "" msgid ""
"If you are looking to port an extension module instead of pure Python code, " "If you are looking to port an extension module instead of pure Python code, "
"please see :ref:`cporting-howto`." "please see :ref:`cporting-howto`."
msgstr "" msgstr ""
"Si vous cherchez à porter un module d'extension plutôt que du pur Python, "
"veuillez consulter :ref:`cporting-howto`."
#: ../Doc/howto/pyporting.rst:19 #: ../Doc/howto/pyporting.rst:19
msgid "" msgid ""
@ -53,16 +59,20 @@ msgid ""
"For help with porting, you can email the python-porting_ mailing list with " "For help with porting, you can email the python-porting_ mailing list with "
"questions." "questions."
msgstr "" msgstr ""
"Vous pouvez solliciter par courriel l'aide de la liste de diffusion python-"
"porting_ pour vos questions liées au portage."
#: ../Doc/howto/pyporting.rst:26 #: ../Doc/howto/pyporting.rst:26
msgid "The Short Explanation" msgid "The Short Explanation"
msgstr "" msgstr "La version courte"
#: ../Doc/howto/pyporting.rst:28 #: ../Doc/howto/pyporting.rst:28
msgid "" msgid ""
"To make your project be single-source Python 2/3 compatible, the basic steps " "To make your project be single-source Python 2/3 compatible, the basic steps "
"are:" "are:"
msgstr "" msgstr ""
"Afin de rendre votre projet compatible Python 2/3 avec le même code source, "
"les étapes de base sont :"
#: ../Doc/howto/pyporting.rst:31 #: ../Doc/howto/pyporting.rst:31
msgid "" msgid ""
@ -75,11 +85,13 @@ msgid ""
"Make sure you have good test coverage (coverage.py_ can help; ``pip install " "Make sure you have good test coverage (coverage.py_ can help; ``pip install "
"coverage``)" "coverage``)"
msgstr "" msgstr ""
"S'assurer d'une bonne couverture des tests (coverage.py_ peut aider ; ``pip "
"install coverage``)"
#: ../Doc/howto/pyporting.rst:35 ../Doc/howto/pyporting.rst:114 #: ../Doc/howto/pyporting.rst:35 ../Doc/howto/pyporting.rst:114
#: ../Doc/howto/pyporting.rst:369 #: ../Doc/howto/pyporting.rst:369
msgid "Learn the differences between Python 2 & 3" msgid "Learn the differences between Python 2 & 3"
msgstr "" msgstr "Apprendre les différences entre Python 2 et 3"
#: ../Doc/howto/pyporting.rst:36 #: ../Doc/howto/pyporting.rst:36
msgid "" msgid ""
@ -98,6 +110,9 @@ msgid ""
"Use caniusepython3_ to find out which of your dependencies are blocking your " "Use caniusepython3_ to find out which of your dependencies are blocking your "
"use of Python 3 (``pip install caniusepython3``)" "use of Python 3 (``pip install caniusepython3``)"
msgstr "" msgstr ""
"Utiliser caniusepython3_ pour déterminer quelles sont, parmi les dépendances "
"que vous utilisez, celles qui bloquent votre utilisation de Python 3 (``pip "
"install caniusepython3``)"
#: ../Doc/howto/pyporting.rst:42 #: ../Doc/howto/pyporting.rst:42
msgid "" msgid ""
@ -105,6 +120,10 @@ msgid ""
"integration to make sure you stay compatible with Python 2 & 3 (tox_ can " "integration to make sure you stay compatible with Python 2 & 3 (tox_ can "
"help test against multiple versions of Python; ``pip install tox``)" "help test against multiple versions of Python; ``pip install tox``)"
msgstr "" msgstr ""
"Une fois que vos dépendances ne sont plus un obstacle, utiliser "
"l'intégration continue pour s'assurer que votre code demeure compatible "
"Python 2 & 3 (tox_ peut aider à tester la comptabilité de sources avec "
"plusieurs versions de Python; ``pip install tox``)"
#: ../Doc/howto/pyporting.rst:46 #: ../Doc/howto/pyporting.rst:46
msgid "" msgid ""
@ -134,12 +153,21 @@ msgid ""
"lower-level work is now mostly done for you and thus can at least benefit " "lower-level work is now mostly done for you and thus can at least benefit "
"from the automated changes immediately." "from the automated changes immediately."
msgstr "" msgstr ""
"Un autre point important est que la modernisation de votre code Python 2 "
"pour le rendre compatible Python 3 est pratiquement automatique. Bien qu'il "
"soit possible d'avoir à effectuer des changements d'API compte-tenu de la "
"clarification de la gestion des données textuelles et binaires dans Python "
"3, le travail de bas niveau est en grande partie fait pour vous et vous "
"pouvez ainsi bénéficiez de ces modifications automatiques immédiatement."
#: ../Doc/howto/pyporting.rst:66 #: ../Doc/howto/pyporting.rst:66
msgid "" msgid ""
"Keep those key points in mind while you read on about the details of porting " "Keep those key points in mind while you read on about the details of porting "
"your code to support Python 2 & 3 simultaneously." "your code to support Python 2 & 3 simultaneously."
msgstr "" msgstr ""
"Gardez ces points-clés en tête pendant que vous lisez les détails ci-dessous "
"concernant le portage de votre code vers une compatibilité simultanée Python "
"2 et 3."
#: ../Doc/howto/pyporting.rst:71 #: ../Doc/howto/pyporting.rst:71
msgid "Drop support for Python 2.5 and older (at least)" msgid "Drop support for Python 2.5 and older (at least)"
@ -176,6 +204,8 @@ msgstr ""
msgid "" msgid ""
"Make sure you specify the proper version support in your ``setup.py`` file" "Make sure you specify the proper version support in your ``setup.py`` file"
msgstr "" msgstr ""
"Assurez vous de spécifier la bonne version supportée dans le fichier ``setup."
"py``"
#: ../Doc/howto/pyporting.rst:94 #: ../Doc/howto/pyporting.rst:94
msgid "" msgid ""
@ -186,10 +216,16 @@ msgid ""
"minor version of Python that you do support, e.g. ``Programming Language :: " "minor version of Python that you do support, e.g. ``Programming Language :: "
"Python :: 2.7``." "Python :: 2.7``."
msgstr "" msgstr ""
"Votre fichier ``setup.py`` devrait contenir le bon `trove classifier`_ "
"spécifiant les versions de Python avec lesquelles vous êtes compatible. "
"Comme votre projet ne supporte pas encore Python 3, vous devriez au moins "
"spécifier ``Programming Language :: Python :: 2 :: Only``. Dans l'idéal vous "
"devriez indiquer chaque version majeure/mineure de Python que vous gérez, "
"par exemple ``Programming Language :: Python :: 2.7``."
#: ../Doc/howto/pyporting.rst:102 #: ../Doc/howto/pyporting.rst:102
msgid "Have good test coverage" msgid "Have good test coverage"
msgstr "" msgstr "Obtenir une bonne couverture de code"
#: ../Doc/howto/pyporting.rst:104 #: ../Doc/howto/pyporting.rst:104
msgid "" msgid ""
@ -213,10 +249,18 @@ msgid ""
"and the `Porting to Python 3`_ book (which is free online). There is also a " "and the `Porting to Python 3`_ book (which is free online). There is also a "
"handy `cheat sheet`_ from the Python-Future project." "handy `cheat sheet`_ from the Python-Future project."
msgstr "" msgstr ""
"Une fois que votre code est bien testé, vous êtes prêt à démarrer votre "
"portage vers Python 3 ! Mais afin de comprendre comment votre code va "
"changer et à quoi s'intéresser spécifiquement pendant que vous codez, vous "
"aurez sûrement envie de découvrir quels sont les changements introduits par "
"Python 3 par rapport à Python 2. Pour atteindre cet objectif, les deux "
"meilleurs moyens sont de lire le document `\"What's New\"`_ de chaque "
"version de Python 3 et le livre `Porting to Python 3`_ (gratuit en ligne). "
"Il y a également une `cheat sheet`_ très pratique du projet Python-Future."
#: ../Doc/howto/pyporting.rst:126 #: ../Doc/howto/pyporting.rst:126
msgid "Update your code" msgid "Update your code"
msgstr "" msgstr "Mettre à jour votre code"
#: ../Doc/howto/pyporting.rst:128 #: ../Doc/howto/pyporting.rst:128
msgid "" msgid ""
@ -242,6 +286,16 @@ msgid ""
"transform your application code knowing that any tests which fail is a " "transform your application code knowing that any tests which fail is a "
"translation failure." "translation failure."
msgstr "" msgstr ""
"Indépendamment de l'outil sur lequel se porte votre choix, celui-ci mettra à "
"jour votre code afin qu'il puisse être exécuté par Python 3 tout en "
"maintenant sa compatibilité avec la version de Python 2 dont vous êtes "
"parti. En fonction du niveau de prudence que vous visez, vous pouvez "
"exécuter l'outil sur votre suite de test d'abord puis inspecter visuellement "
"la différence afin de vous assurer que la transformation est exacte. Après "
"avoir transformé votre suite de test et vérifié que tous les tests "
"s'exécutent comme attendu, vous pouvez transformer le code de votre "
"application avec l'assurance que chaque test qui échoue correspond à un "
"échec de traduction."
#: ../Doc/howto/pyporting.rst:146 #: ../Doc/howto/pyporting.rst:146
msgid "" msgid ""
@ -256,6 +310,18 @@ msgid ""
"watch out for which can be considered large issues that may be hard to debug " "watch out for which can be considered large issues that may be hard to debug "
"if not watched for." "if not watched for."
msgstr "" msgstr ""
"Malheureusement les outils ne peuvent pas automatiser tous les changements "
"requis pour permettre à votre code de s'exécuter sous Python 3 et il y a "
"donc quelques points sur lesquels vous devrez travailler manuellement afin "
"d'atteindre la compatibilité totale Python 3 (les étapes nécessaires peuvent "
"varier en fonction de l'outil utilisé). Lisez la documentation de l'outil "
"que vous avez choisi afin d'identifier ce qu'il corrige par défaut et ce qui "
"peut être appliqué de façon optionnelle afin de savoir ce qui sera (ou non) "
"corrigé pour vous ou ce que vous devrez modifier vous-même (par exemple, le "
"remplacement ``io.open()`` plutôt que la fonction native ``open()`` est "
"inactif par défaut dans *Modernize*). Heureusement, il n'y a que quelques "
"points à surveiller qui peuvent réellement être considérés comme des "
"problèmes difficiles à déboguer si vous n'y prêtez pas attention."
#: ../Doc/howto/pyporting.rst:157 #: ../Doc/howto/pyporting.rst:157
msgid "Division" msgid "Division"
@ -271,16 +337,27 @@ msgid ""
"Q`` flag. If you have not been doing this then you will need to go through " "Q`` flag. If you have not been doing this then you will need to go through "
"your code and do two things:" "your code and do two things:"
msgstr "" msgstr ""
"Dans Python 3, ``5 / 2 == 2.5`` et non ``2``; toutes les divisions entre des "
"valeurs ``int`` renvoient un ``float``. Ce changement était en réalité "
"planifié depuis Python 2.2, publié en 2002. Depuis cette date, les "
"utilisateurs ont été encouragés à ajouter ``from __future__ import "
"division`` à tous les fichiers utilisant les opérateurs ``/`` et ``//`` ou à "
"exécuter l'interpréteur avec l'option ``-Q``. Si vous n'avez pas suivi cette "
"recommandation, vous devrez manuellement modifier votre code et effectuer "
"deux changements :"
#: ../Doc/howto/pyporting.rst:167 #: ../Doc/howto/pyporting.rst:167
msgid "Add ``from __future__ import division`` to your files" msgid "Add ``from __future__ import division`` to your files"
msgstr "" msgstr "Ajouter ``from __future__ import division`` à vos fichiers"
#: ../Doc/howto/pyporting.rst:168 #: ../Doc/howto/pyporting.rst:168
msgid "" msgid ""
"Update any division operator as necessary to either use ``//`` to use floor " "Update any division operator as necessary to either use ``//`` to use floor "
"division or continue using ``/`` and expect a float" "division or continue using ``/`` and expect a float"
msgstr "" msgstr ""
"Remplacer tous les opérateurs de division par ``//`` pour la division "
"entière, le cas échant, ou utiliser ``/`` et vous attendre à un résultat "
"flottant"
#: ../Doc/howto/pyporting.rst:171 #: ../Doc/howto/pyporting.rst:171
msgid "" msgid ""
@ -291,7 +368,7 @@ msgstr ""
#: ../Doc/howto/pyporting.rst:176 #: ../Doc/howto/pyporting.rst:176
msgid "Text versus binary data" msgid "Text versus binary data"
msgstr "" msgstr "Texte et données binaires"
#: ../Doc/howto/pyporting.rst:178 #: ../Doc/howto/pyporting.rst:178
msgid "" msgid ""
@ -304,6 +381,16 @@ msgid ""
"supporting multiple languages as APIs wouldn't bother explicitly supporting " "supporting multiple languages as APIs wouldn't bother explicitly supporting "
"``unicode`` when they claimed text data support." "``unicode`` when they claimed text data support."
msgstr "" msgstr ""
"Dans Python 2, il était possible d'utiliser le type ``str`` pour du texte et "
"pour des données binaires. Malheureusement cet amalgame entre deux concepts "
"différents peut conduire à du code fragile pouvant parfois fonctionner pour "
"les deux types de données et parfois non. Cela a également conduit à des API "
"confuses si les auteurs ne déclaraient pas explicitement que quelque chose "
"qui acceptait ``str`` était compatible avec du texte ou des données binaires "
"et pas un seul des deux types. Cela a compliqué la situation pour les "
"personnes devant gérer plusieurs langages avec des API qui ne se "
"préoccupaient pas de la gestion de ``unicode`` lorsqu'elles affirmaient être "
"compatibles avec des données au format texte."
#: ../Doc/howto/pyporting.rst:187 #: ../Doc/howto/pyporting.rst:187
msgid "" msgid ""
@ -338,11 +425,11 @@ msgstr ""
#: ../Doc/howto/pyporting.rst:212 #: ../Doc/howto/pyporting.rst:212
msgid "**Text data**" msgid "**Text data**"
msgstr "" msgstr "**Format texte**"
#: ../Doc/howto/pyporting.rst:212 #: ../Doc/howto/pyporting.rst:212
msgid "**Binary data**" msgid "**Binary data**"
msgstr "" msgstr "**Format binaire**"
#: ../Doc/howto/pyporting.rst:214 #: ../Doc/howto/pyporting.rst:214
msgid "__mod__ (``%`` operator)" msgid "__mod__ (``%`` operator)"
@ -350,27 +437,27 @@ msgstr ""
#: ../Doc/howto/pyporting.rst:216 #: ../Doc/howto/pyporting.rst:216
msgid "\\" msgid "\\"
msgstr "" msgstr "\\"
#: ../Doc/howto/pyporting.rst:216 #: ../Doc/howto/pyporting.rst:216
msgid "decode" msgid "decode"
msgstr "" msgstr "decode"
#: ../Doc/howto/pyporting.rst:218 #: ../Doc/howto/pyporting.rst:218
msgid "encode" msgid "encode"
msgstr "" msgstr "encode"
#: ../Doc/howto/pyporting.rst:220 #: ../Doc/howto/pyporting.rst:220
msgid "format" msgid "format"
msgstr "" msgstr "format"
#: ../Doc/howto/pyporting.rst:222 #: ../Doc/howto/pyporting.rst:222
msgid "isdecimal" msgid "isdecimal"
msgstr "" msgstr "isdecimal"
#: ../Doc/howto/pyporting.rst:224 #: ../Doc/howto/pyporting.rst:224
msgid "isnumeric" msgid "isnumeric"
msgstr "" msgstr "isnumeric"
#: ../Doc/howto/pyporting.rst:227 #: ../Doc/howto/pyporting.rst:227
msgid "" msgid ""
@ -381,6 +468,14 @@ msgid ""
"possible. This allows your code to work with only text internally and thus " "possible. This allows your code to work with only text internally and thus "
"eliminates having to keep track of what type of data you are working with." "eliminates having to keep track of what type of data you are working with."
msgstr "" msgstr ""
"Vous pouvez rendre le problème plus simple à gérer en réalisant les "
"opérations d'encodage et de décodage entre données binaires et texte aux "
"extrémités de votre code. Cela signifie que lorsque vous recevez du texte "
"dans un format binaire, vous devez immédiatement le décoder. À l'inverse si "
"votre code doit transmettre du texte sous forme binaire, encodez-le le plus "
"tard possible. Cela vous permet de ne manipuler que du texte à l'intérieur "
"de votre code et permet de ne pas se préoccuper du type des données sur "
"lesquelles vous travaillez."
#: ../Doc/howto/pyporting.rst:234 #: ../Doc/howto/pyporting.rst:234
msgid "" msgid ""
@ -419,6 +514,16 @@ msgid ""
"back: ``str(b'3') == b'3'``. But in Python 3 you get the string " "back: ``str(b'3') == b'3'``. But in Python 3 you get the string "
"representation of the bytes object: ``str(b'3') == \"b'3'\"``." "representation of the bytes object: ``str(b'3') == \"b'3'\"``."
msgstr "" msgstr ""
"Les constructeurs des types ``str`` et ``bytes`` possèdent une sémantique "
"différente pour les mêmes arguments sous Python 2 et 3. Passer un entier à "
"``bytes`` sous Python 2 produit une représentation de cet entier en chaîne "
"de caractères : ``bytes(3) == '3'``. Mais sous Python 3, fournir un argument "
"entier à ``bytes`` produit un objet *bytes* de la longueur de l'entier "
"spécifié, rempli par des octets nuls : ``bytes(3) == b'\\x00\\x00\\x00'``. "
"La même prudence est nécessaire lorsque vous passez un objet *bytes* à "
"``str``. En Python 2, vous récupérez simplement l'objet *bytes* initial : "
"``str(b'3') == b'3'``. Mais en Python 3, vous récupérez la représentation en "
"chaîne de caractères de l'objet *bytes* : ``str(b'3') == \"b'3'\"``."
#: ../Doc/howto/pyporting.rst:262 #: ../Doc/howto/pyporting.rst:262
msgid "" msgid ""
@ -431,14 +536,25 @@ msgid ""
"``six.indexbytes()`` which will return an integer like in Python 3: ``six." "``six.indexbytes()`` which will return an integer like in Python 3: ``six."
"indexbytes(b'123', 1)``." "indexbytes(b'123', 1)``."
msgstr "" msgstr ""
"Enfin, l'indiçage des données binaires exige une manipulation prudente (bien "
"que le découpage, ou *slicing* en anglais, ne nécessite pas d'attention "
"particulière). En Python 2, ``b'123'[1] == b'2'`` tandis qu'en Python 3 "
"``b'123'[1] == 50``. Puisque les données binaires ne sont simplement qu'une "
"collection de nombres en binaire, Python 3 renvoie la valeur entière de "
"l'octet indicé. Mais en Python 2, étant donné que ``bytes == str``, "
"l'indiçage renvoie une tranche de longueur 1 de *bytes*. Le projet six_ "
"dispose d'une fonction appelée ``six.indexbytes()`` qui renvoie un entier "
"comme en Python 3 : ``six.indexbytes(b'123', 1)``."
#: ../Doc/howto/pyporting.rst:271 #: ../Doc/howto/pyporting.rst:271
msgid "To summarize:" msgid "To summarize:"
msgstr "" msgstr "Pour résumer :"
#: ../Doc/howto/pyporting.rst:273 #: ../Doc/howto/pyporting.rst:273
msgid "Decide which of your APIs take text and which take binary data" msgid "Decide which of your APIs take text and which take binary data"
msgstr "" msgstr ""
"Décidez lesquelles de vos API travaillent sur du texte et lesquelles "
"travaillent sur des données binaires"
#: ../Doc/howto/pyporting.rst:274 #: ../Doc/howto/pyporting.rst:274
msgid "" msgid ""
@ -446,6 +562,10 @@ msgid ""
"and code for binary data works with ``bytes`` in Python 2 (see the table " "and code for binary data works with ``bytes`` in Python 2 (see the table "
"above for what methods you cannot use for each type)" "above for what methods you cannot use for each type)"
msgstr "" msgstr ""
"Assurez vous que votre code travaillant sur du texte fonctionne aussi avec "
"le type ``unicode`` et que le code travaillant sur du binaire fonctionne "
"avec le type ``bytes`` en Python 2 (voir le tableau ci-dessus pour la liste "
"des méthodes utilisables par chaque type)"
#: ../Doc/howto/pyporting.rst:277 #: ../Doc/howto/pyporting.rst:277
msgid "" msgid ""
@ -458,12 +578,16 @@ msgid ""
"Decode binary data to text as soon as possible, encode text as binary data " "Decode binary data to text as soon as possible, encode text as binary data "
"as late as possible" "as late as possible"
msgstr "" msgstr ""
"Décodez les données binaires en texte dès que possible, encodez votre texte "
"au format binaire le plus tard possible"
#: ../Doc/howto/pyporting.rst:281 #: ../Doc/howto/pyporting.rst:281
msgid "" msgid ""
"Open files using :func:`io.open` and make sure to specify the ``b`` mode " "Open files using :func:`io.open` and make sure to specify the ``b`` mode "
"when appropriate" "when appropriate"
msgstr "" msgstr ""
"Ouvrez les fichiers avec la fonction :func:`io.open` et assurez-vous de "
"spécifier le mode ``b`` le cas échéant"
#: ../Doc/howto/pyporting.rst:283 #: ../Doc/howto/pyporting.rst:283
msgid "Be careful when indexing binary data" msgid "Be careful when indexing binary data"
@ -471,7 +595,7 @@ msgstr ""
#: ../Doc/howto/pyporting.rst:286 #: ../Doc/howto/pyporting.rst:286
msgid "Prevent compatibility regressions" msgid "Prevent compatibility regressions"
msgstr "" msgstr "Prévenir les régressions de compatibilité"
#: ../Doc/howto/pyporting.rst:288 #: ../Doc/howto/pyporting.rst:288
msgid "" msgid ""
@ -480,12 +604,19 @@ msgid ""
"Python 3. This is especially true if you have a dependency which is blocking " "Python 3. This is especially true if you have a dependency which is blocking "
"you from actually running under Python 3 at the moment." "you from actually running under Python 3 at the moment."
msgstr "" msgstr ""
"Une fois votre code traduit pour être compatible avec Python 3, vous devez "
"vous assurer que votre code n'a pas régressé ou qu'il ne fonctionne pas sous "
"Python 3. Ceci est particulièrement important si une de vos dépendances vous "
"empêche de réellement exécuter le code sous Python 3 pour le moment."
#: ../Doc/howto/pyporting.rst:293 #: ../Doc/howto/pyporting.rst:293
msgid "" msgid ""
"To help with staying compatible, any new modules you create should have at " "To help with staying compatible, any new modules you create should have at "
"least the following block of code at the top of it::" "least the following block of code at the top of it::"
msgstr "" msgstr ""
"Afin de vous aider à maintenir la compatibilité, nous préconisons que tous "
"les nouveaux modules que vous créez aient au moins le bloc de code suivant "
"en en-tête : ::"
#: ../Doc/howto/pyporting.rst:301 #: ../Doc/howto/pyporting.rst:301
msgid "" msgid ""
@ -494,6 +625,11 @@ msgid ""
"warnings into errors with ``-Werror`` then you can make sure that you don't " "warnings into errors with ``-Werror`` then you can make sure that you don't "
"accidentally miss a warning." "accidentally miss a warning."
msgstr "" msgstr ""
"Vous pouvez également lancer Python 2 avec le paramètre ``-3`` afin d'être "
"alerté en cas de divers problèmes de compatibilité que votre code déclenche "
"durant son exécution. Si vous transformez les avertissements en erreur avec "
"``-Werror``, vous pouvez être certain que ne passez pas accidentellement à "
"côté d'un avertissement."
#: ../Doc/howto/pyporting.rst:307 #: ../Doc/howto/pyporting.rst:307
msgid "" msgid ""
@ -504,10 +640,17 @@ msgid ""
"does require you only support Python 2.7 and Python 3.4 or newer as that is " "does require you only support Python 2.7 and Python 3.4 or newer as that is "
"Pylint's minimum Python version support." "Pylint's minimum Python version support."
msgstr "" msgstr ""
"Vous pouvez également utiliser le projet Pylint_ et son option ``--py3k`` "
"afin de modifier votre code pour recevoir des avertissements lorsque celui-"
"ci dévie de la compatibilité Python 3. Cela vous évite par ailleurs "
"d'appliquer Modernize_ ou Futurize_ sur votre code régulièrement pour "
"détecter des régressions liées à la compatibilité. Cependant cela nécessite "
"de votre part le support de Python 2.7 et Python 3.4 ou ultérieur étant "
"donné qu'il s'agit de la version minimale gérée par Pylint."
#: ../Doc/howto/pyporting.rst:316 #: ../Doc/howto/pyporting.rst:316
msgid "Check which dependencies block your transition" msgid "Check which dependencies block your transition"
msgstr "" msgstr "Vérifier quelles dépendances empêchent la migration"
#: ../Doc/howto/pyporting.rst:318 #: ../Doc/howto/pyporting.rst:318
msgid "" msgid ""
@ -527,10 +670,17 @@ msgid ""
"manually check your dependencies and to be notified quickly when you can " "manually check your dependencies and to be notified quickly when you can "
"start running on Python 3." "start running on Python 3."
msgstr "" msgstr ""
"Le projet fournit également du code intégrable dans votre suite de test qui "
"déclenchera un échec de test lorsque plus aucune de vos dépendances n'est "
"bloquante pour l'utilisation de Python 3. Cela vous permet de ne pas avoir à "
"vérifier manuellement vos dépendances et d'être notifié rapidement quand "
"vous pouvez exécuter votre application avec Python 3."
#: ../Doc/howto/pyporting.rst:331 #: ../Doc/howto/pyporting.rst:331
msgid "Update your ``setup.py`` file to denote Python 3 compatibility" msgid "Update your ``setup.py`` file to denote Python 3 compatibility"
msgstr "" msgstr ""
"Mettre à jour votre fichier ``setup.py`` pour spécifier la compatibilité "
"avec Python 3"
#: ../Doc/howto/pyporting.rst:333 #: ../Doc/howto/pyporting.rst:333
msgid "" msgid ""
@ -540,10 +690,16 @@ msgid ""
"that you support Python 2 **and** 3. Ideally you will also want to add " "that you support Python 2 **and** 3. Ideally you will also want to add "
"classifiers for each major/minor version of Python you now support." "classifiers for each major/minor version of Python you now support."
msgstr "" msgstr ""
"Une fois que votre code fonctionne sous Python 3, vous devez mettre à jour "
"vos classeurs dans votre ``setup.py`` pour inclure ``Programming Language :: "
"Python :: 3`` et non seulement le support de Python 2. Cela signifiera à "
"quiconque utilise votre code que vous gérez Python 2 **et** 3. Dans l'idéal "
"vous devrez aussi ajouter une mention pour chaque version majeure/mineure de "
"Python que vous supportez désormais."
#: ../Doc/howto/pyporting.rst:341 #: ../Doc/howto/pyporting.rst:341
msgid "Use continuous integration to stay compatible" msgid "Use continuous integration to stay compatible"
msgstr "" msgstr "Utiliser l'intégration continue pour maintenir la compatibilité"
#: ../Doc/howto/pyporting.rst:343 #: ../Doc/howto/pyporting.rst:343
msgid "" msgid ""
@ -553,6 +709,12 @@ msgid ""
"integrate tox with your continuous integration system so that you never " "integrate tox with your continuous integration system so that you never "
"accidentally break Python 2 or 3 support." "accidentally break Python 2 or 3 support."
msgstr "" msgstr ""
"Une fois que vous êtes en mesure d'exécuter votre code sous Python 3, vous "
"devrez vous assurer que celui-ci fonctionne toujours pour Python 2 & 3. tox_ "
"est vraisemblablement le meilleur outil pour exécuter vos tests avec "
"plusieurs interpréteurs Python. Vous pouvez alors intégrer *tox* à votre "
"système d'intégration continue afin de ne jamais accidentellement casser "
"votre gestion de Python 2 ou 3."
#: ../Doc/howto/pyporting.rst:349 #: ../Doc/howto/pyporting.rst:349
msgid "" msgid ""
@ -571,6 +733,11 @@ msgid ""
"don't accidentally break Python 2 or 3 compatibility regardless of which " "don't accidentally break Python 2 or 3 compatibility regardless of which "
"version you typically run your tests under while developing." "version you typically run your tests under while developing."
msgstr "" msgstr ""
"Et c'est à peu près tout ! Une fois ceci fait, votre code source est "
"compatible avec Python 2 et 3 simultanément. Votre suite de test est "
"également en place de telle sorte que vous ne cassiez pas la compatibilité "
"Python 2 ou 3 indépendamment de la version que vous utilisez pendant le "
"développement."
#: ../Doc/howto/pyporting.rst:362 #: ../Doc/howto/pyporting.rst:362
msgid "Dropping Python 2 support completely" msgid "Dropping Python 2 support completely"

View File

@ -553,7 +553,7 @@ msgstr ""
#: ../Doc/howto/sockets.rst:395 #: ../Doc/howto/sockets.rst:395
msgid "Performance" msgid "Performance"
msgstr "" msgstr "Performances"
#: ../Doc/howto/sockets.rst:397 #: ../Doc/howto/sockets.rst:397
msgid "" msgid ""

View File

@ -427,6 +427,8 @@ msgid ""
"Now that you've learned the rudiments of Unicode, we can look at Python's " "Now that you've learned the rudiments of Unicode, we can look at Python's "
"Unicode features." "Unicode features."
msgstr "" msgstr ""
"Maintenant que vous avez appris les rudiments de l'Unicode, nous pouvons "
"regarder les fonctionnalités Unicode de Python."
#: ../Doc/howto/unicode.rst:236 #: ../Doc/howto/unicode.rst:236
msgid "The Unicode Type" msgid "The Unicode Type"
@ -538,7 +540,7 @@ msgstr ""
#: ../Doc/howto/unicode.rst:374 #: ../Doc/howto/unicode.rst:374
msgid "Unicode Literals in Python Source Code" msgid "Unicode Literals in Python Source Code"
msgstr "" msgstr "Littéraux Unicode dans le code source Python"
#: ../Doc/howto/unicode.rst:376 #: ../Doc/howto/unicode.rst:376
msgid "" msgid ""
@ -573,6 +575,10 @@ msgid ""
"which would display the accented characters naturally, and have the right " "which would display the accented characters naturally, and have the right "
"characters used at runtime." "characters used at runtime."
msgstr "" msgstr ""
"Idéalement, vous devriez être capable d'écrire des littéraux dans l'encodage "
"naturel de votre langue. Vous pourriez alors éditer le code source de "
"Python avec votre éditeur favori qui affiche les caractères accentués "
"naturellement, et a les bons caractères utilisés au moment de l'exécution."
#: ../Doc/howto/unicode.rst:407 #: ../Doc/howto/unicode.rst:407
msgid "" msgid ""
@ -589,6 +595,12 @@ msgid ""
"special; they have no significance to Python but are a convention. Python " "special; they have no significance to Python but are a convention. Python "
"looks for ``coding: name`` or ``coding=name`` in the comment." "looks for ``coding: name`` or ``coding=name`` in the comment."
msgstr "" msgstr ""
"La syntaxe s'inspire de la notation d'Emacs pour spécifier les variables "
"locales à un fichier. *Emacs* supporte de nombreuses variables différentes, "
"mais Python ne gère que *coding*. Les symboles ``-*-`` indiquent à Emacs "
"que le commentaire est spécial ; ils n'ont aucune signification pour Python "
"mais sont une convention. Python cherche ``coding: name`` ou "
"``coding=name`` dans le commentaire."
#: ../Doc/howto/unicode.rst:423 #: ../Doc/howto/unicode.rst:423
msgid "" msgid ""
@ -609,7 +621,7 @@ msgstr ""
#: ../Doc/howto/unicode.rst:450 #: ../Doc/howto/unicode.rst:450
msgid "Unicode Properties" msgid "Unicode Properties"
msgstr "" msgstr "Propriétés Unicode"
#: ../Doc/howto/unicode.rst:452 #: ../Doc/howto/unicode.rst:452
msgid "" msgid ""
@ -626,6 +638,8 @@ msgid ""
"The following program displays some information about several characters, " "The following program displays some information about several characters, "
"and prints the numeric value of one particular character::" "and prints the numeric value of one particular character::"
msgstr "" msgstr ""
"Le programme suivant affiche des informations sur plusieurs caractères et "
"affiche la valeur numérique d'un caractère particulier ::"
#: ../Doc/howto/unicode.rst:473 #: ../Doc/howto/unicode.rst:473
msgid "When run, this prints::" msgid "When run, this prints::"
@ -650,11 +664,11 @@ msgstr ""
#: ../Doc/howto/unicode.rst:497 #: ../Doc/howto/unicode.rst:497
msgid "The documentation for the :mod:`unicodedata` module." msgid "The documentation for the :mod:`unicodedata` module."
msgstr "" msgstr "La documentation du module :mod:`unicodedata`."
#: ../Doc/howto/unicode.rst:499 #: ../Doc/howto/unicode.rst:499
msgid "The documentation for the :mod:`codecs` module." msgid "The documentation for the :mod:`codecs` module."
msgstr "" msgstr "La documentation du module :mod:`codecs`."
#: ../Doc/howto/unicode.rst:501 #: ../Doc/howto/unicode.rst:501
msgid "" msgid ""
@ -666,7 +680,7 @@ msgstr ""
#: ../Doc/howto/unicode.rst:508 #: ../Doc/howto/unicode.rst:508
msgid "Reading and Writing Unicode Data" msgid "Reading and Writing Unicode Data"
msgstr "" msgstr "Lecture et écriture de données Unicode"
#: ../Doc/howto/unicode.rst:510 #: ../Doc/howto/unicode.rst:510
msgid "" msgid ""
@ -674,6 +688,10 @@ msgid ""
"is input/output. How do you get Unicode strings into your program, and how " "is input/output. How do you get Unicode strings into your program, and how "
"do you convert Unicode into a form suitable for storage or transmission?" "do you convert Unicode into a form suitable for storage or transmission?"
msgstr "" msgstr ""
"Une fois que vous avez écrit du code qui fonctionne avec des données "
"Unicode, le problème suivant concerne les entrées/sorties. Comment obtenir "
"des chaînes Unicode dans votre programme et comment convertir les chaînes "
"Unicode dans une forme appropriée pour le stockage ou la transmission ?"
#: ../Doc/howto/unicode.rst:514 #: ../Doc/howto/unicode.rst:514
msgid "" msgid ""
@ -683,6 +701,13 @@ msgid ""
"Unicode data, for example. Many relational databases also support Unicode-" "Unicode data, for example. Many relational databases also support Unicode-"
"valued columns and can return Unicode values from an SQL query." "valued columns and can return Unicode values from an SQL query."
msgstr "" msgstr ""
"Il est possible que vous n'ayez rien à faire en fonction de vos sources "
"d'entrée et des destinations de vos données de sortie ; il convient de "
"vérifier si les bibliothèques utilisées dans votre application gèrent "
"l'Unicode nativement. Par exemple, les analyseurs XML renvoient souvent des "
"données Unicode. De nombreuses bases de données relationnelles prennent "
"également en charge les colonnes encodées en Unicode et peuvent renvoyer des "
"valeurs Unicode à partir d'une requête SQL."
#: ../Doc/howto/unicode.rst:520 #: ../Doc/howto/unicode.rst:520
msgid "" msgid ""
@ -733,13 +758,15 @@ msgstr ""
#: ../Doc/howto/unicode.rst:553 #: ../Doc/howto/unicode.rst:553
msgid "Reading Unicode from a file is therefore simple::" msgid "Reading Unicode from a file is therefore simple::"
msgstr "" msgstr "Lire de l'Unicode à partir d'un fichier est donc simple ::"
#: ../Doc/howto/unicode.rst:560 #: ../Doc/howto/unicode.rst:560
msgid "" msgid ""
"It's also possible to open files in update mode, allowing both reading and " "It's also possible to open files in update mode, allowing both reading and "
"writing::" "writing::"
msgstr "" msgstr ""
"Il est également possible d'ouvrir des fichiers en mode « mise à jour », "
"permettant à la fois la lecture et l'écriture ::"
#: ../Doc/howto/unicode.rst:569 #: ../Doc/howto/unicode.rst:569
msgid "" msgid ""
@ -756,7 +783,7 @@ msgstr ""
#: ../Doc/howto/unicode.rst:580 #: ../Doc/howto/unicode.rst:580
msgid "Unicode filenames" msgid "Unicode filenames"
msgstr "" msgstr "Noms de fichiers Unicode"
#: ../Doc/howto/unicode.rst:582 #: ../Doc/howto/unicode.rst:582
msgid "" msgid ""
@ -778,12 +805,20 @@ msgid ""
"writing, you can usually just provide the Unicode string as the filename, " "writing, you can usually just provide the Unicode string as the filename, "
"and it will be automatically converted to the right encoding for you::" "and it will be automatically converted to the right encoding for you::"
msgstr "" msgstr ""
"La fonction :func:`sys.getfilesystemencoding` renvoie l'encodage à utiliser "
"sur votre système actuel, au cas où vous voudriez faire l'encodage "
"manuellement, mais il n'y a pas vraiment de raisons de s'embêter avec ça. "
"Lors de l'ouverture d'un fichier pour la lecture ou l'écriture, vous pouvez "
"généralement simplement fournir la chaîne Unicode comme nom de fichier et "
"elle est automatiquement convertie à l'encodage qui convient ::"
#: ../Doc/howto/unicode.rst:602 #: ../Doc/howto/unicode.rst:602
msgid "" msgid ""
"Functions in the :mod:`os` module such as :func:`os.stat` will also accept " "Functions in the :mod:`os` module such as :func:`os.stat` will also accept "
"Unicode filenames." "Unicode filenames."
msgstr "" msgstr ""
"Les fonctions du module :mod:`os` telles que :func:`os.stat` acceptent "
"également les noms de fichiers Unicode."
#: ../Doc/howto/unicode.rst:605 #: ../Doc/howto/unicode.rst:605
msgid "" msgid ""
@ -800,27 +835,31 @@ msgstr ""
#: ../Doc/howto/unicode.rst:622 #: ../Doc/howto/unicode.rst:622
msgid "will produce the following output:" msgid "will produce the following output:"
msgstr "" msgstr "produit la sortie suivante :"
#: ../Doc/howto/unicode.rst:630 #: ../Doc/howto/unicode.rst:630
msgid "" msgid ""
"The first list contains UTF-8-encoded filenames, and the second list " "The first list contains UTF-8-encoded filenames, and the second list "
"contains the Unicode versions." "contains the Unicode versions."
msgstr "" msgstr ""
"La première liste contient les noms de fichiers encodés en UTF-8 et la "
"seconde contient les versions Unicode."
#: ../Doc/howto/unicode.rst:636 #: ../Doc/howto/unicode.rst:636
msgid "Tips for Writing Unicode-aware Programs" msgid "Tips for Writing Unicode-aware Programs"
msgstr "" msgstr "Conseils pour écrire des programmes compatibles Unicode"
#: ../Doc/howto/unicode.rst:638 #: ../Doc/howto/unicode.rst:638
msgid "" msgid ""
"This section provides some suggestions on writing software that deals with " "This section provides some suggestions on writing software that deals with "
"Unicode." "Unicode."
msgstr "" msgstr ""
"Cette section fournit quelques suggestions sur l'écriture de logiciels qui "
"traitent de l'Unicode."
#: ../Doc/howto/unicode.rst:641 #: ../Doc/howto/unicode.rst:641
msgid "The most important tip is:" msgid "The most important tip is:"
msgstr "" msgstr "Le conseil le plus important est:"
#: ../Doc/howto/unicode.rst:643 #: ../Doc/howto/unicode.rst:643
msgid "" msgid ""
@ -892,7 +931,7 @@ msgstr ""
#: ../Doc/howto/unicode.rst:698 #: ../Doc/howto/unicode.rst:698
msgid "Revision History and Acknowledgements" msgid "Revision History and Acknowledgements"
msgstr "" msgstr "Historique des modifications et remerciements"
#: ../Doc/howto/unicode.rst:700 #: ../Doc/howto/unicode.rst:700
msgid "" msgid ""

View File

@ -128,6 +128,13 @@ msgid ""
"purposes the default is ``None``, so that 0 and 1 are not allowed in the " "purposes the default is ``None``, so that 0 and 1 are not allowed in the "
"input." "input."
msgstr "" msgstr ""
"La :rfc:`3548` autorise une correspondance optionnelle du chiffre 0 (zéro) "
"vers la lettre O (/o/) ainsi que du chiffre 1 (un) vers soit la lettre I (/"
"i/) ou la lettre L (/l/). L'argument optionnel *map01*, lorsqu'il diffère de "
"``None``, spécifie en quelle lettre le chiffre 1 doit être transformé "
"(lorsque *map01* n'est pas ``None``, le chiffre 0 est toujours transformé en "
"la lettre O). Pour des raisons de sécurité, le défaut est ``None``, de telle "
"sorte que 0 et 1 ne sont pas autorisés dans l'entrée."
#: ../Doc/library/base64.rst:100 #: ../Doc/library/base64.rst:100
msgid "" msgid ""
@ -211,9 +218,14 @@ msgid ""
"Mechanisms for Specifying and Describing the Format of Internet Message " "Mechanisms for Specifying and Describing the Format of Internet Message "
"Bodies" "Bodies"
msgstr "" msgstr ""
":rfc:`1521` — MIME (*Multipurpose Internet Mail Extensions*) *Part One: "
"Mechanisms for Specifying and Describing the Format of Internet Message "
"Bodies*"
#: ../Doc/library/base64.rst:174 #: ../Doc/library/base64.rst:174
msgid "" msgid ""
"Section 5.2, \"Base64 Content-Transfer-Encoding,\" provides the definition " "Section 5.2, \"Base64 Content-Transfer-Encoding,\" provides the definition "
"of the base64 encoding." "of the base64 encoding."
msgstr "" msgstr ""
"La Section 5.2, \"*Base64 Content-Transfer-Encoding*\", donne la définition "
"de l'encodage base64."

View File

@ -31,6 +31,9 @@ msgid ""
"`with` statement. For more information see also :ref:`typecontextmanager` " "`with` statement. For more information see also :ref:`typecontextmanager` "
"and :ref:`context-managers`." "and :ref:`context-managers`."
msgstr "" msgstr ""
"Ce module fournit des utilitaires pour les tâches impliquant le mot-clé :"
"keyword:`with`. Pour plus d'informations voir aussi :ref:"
"`typecontextmanager` et :ref:`context-managers`."
#: ../Doc/library/contextlib.rst:18 #: ../Doc/library/contextlib.rst:18
msgid "Functions provided:" msgid "Functions provided:"
@ -42,6 +45,10 @@ msgid ""
"function for :keyword:`with` statement context managers, without needing to " "function for :keyword:`with` statement context managers, without needing to "
"create a class or separate :meth:`__enter__` and :meth:`__exit__` methods." "create a class or separate :meth:`__enter__` and :meth:`__exit__` methods."
msgstr "" msgstr ""
"Cette fonction est un :term:`decorator` qui peut être utilisé pour définir "
"une fonction fabriquant des gestionnaires de contexte à utiliser avec :"
"keyword:`with`, sans nécessiter de créer une classe ou des méthodes :meth:"
"`__enter__` et :meth:`__exit__` séparées."
#: ../Doc/library/contextlib.rst:27 #: ../Doc/library/contextlib.rst:27
msgid "" msgid ""
@ -141,16 +148,20 @@ msgid ""
"Return a context manager that closes *thing* upon completion of the block. " "Return a context manager that closes *thing* upon completion of the block. "
"This is basically equivalent to::" "This is basically equivalent to::"
msgstr "" msgstr ""
"Renvoie un gestionnaire de contexte qui ferme *thing* à la fin du bloc. "
"C'est essentiellement équivalent à ::"
#: ../Doc/library/contextlib.rst:123 #: ../Doc/library/contextlib.rst:123
msgid "And lets you write code like this::" msgid "And lets you write code like this::"
msgstr "" msgstr "Et cela vous permet d'écrire du code tel que ::"
#: ../Doc/library/contextlib.rst:132 #: ../Doc/library/contextlib.rst:132
msgid "" msgid ""
"without needing to explicitly close ``page``. Even if an error occurs, " "without needing to explicitly close ``page``. Even if an error occurs, "
"``page.close()`` will be called when the :keyword:`with` block is exited." "``page.close()`` will be called when the :keyword:`with` block is exited."
msgstr "" msgstr ""
"sans besoin de fermer explicitement ``page``. Même si une erreur survient, "
"``page.close()`` est appelée à la fermeture du bloc :keyword:`with`."
#: ../Doc/library/contextlib.rst:139 #: ../Doc/library/contextlib.rst:139
msgid ":pep:`343` - The \"with\" statement" msgid ":pep:`343` - The \"with\" statement"

View File

@ -1783,7 +1783,7 @@ msgstr "``KEY_CLOSE``"
#: ../Doc/library/curses.rst:1345 #: ../Doc/library/curses.rst:1345
msgid "Close" msgid "Close"
msgstr "" msgstr "*Close*"
#: ../Doc/library/curses.rst:1347 #: ../Doc/library/curses.rst:1347
msgid "``KEY_COMMAND``" msgid "``KEY_COMMAND``"
@ -1799,7 +1799,7 @@ msgstr "``KEY_COPY``"
#: ../Doc/library/curses.rst:1349 #: ../Doc/library/curses.rst:1349
msgid "Copy" msgid "Copy"
msgstr "" msgstr "*Copy*"
#: ../Doc/library/curses.rst:1351 #: ../Doc/library/curses.rst:1351
msgid "``KEY_CREATE``" msgid "``KEY_CREATE``"
@ -1823,7 +1823,7 @@ msgstr "``KEY_EXIT``"
#: ../Doc/library/curses.rst:1355 #: ../Doc/library/curses.rst:1355
msgid "Exit" msgid "Exit"
msgstr "" msgstr "*Exit*"
#: ../Doc/library/curses.rst:1357 #: ../Doc/library/curses.rst:1357
msgid "``KEY_FIND``" msgid "``KEY_FIND``"
@ -1903,7 +1903,7 @@ msgstr "``KEY_REDO``"
#: ../Doc/library/curses.rst:1375 #: ../Doc/library/curses.rst:1375
msgid "Redo" msgid "Redo"
msgstr "" msgstr "*Redo*"
#: ../Doc/library/curses.rst:1377 #: ../Doc/library/curses.rst:1377
msgid "``KEY_REFERENCE``" msgid "``KEY_REFERENCE``"
@ -1951,7 +1951,7 @@ msgstr "``KEY_SAVE``"
#: ../Doc/library/curses.rst:1387 #: ../Doc/library/curses.rst:1387
msgid "Save" msgid "Save"
msgstr "" msgstr "*Save*"
#: ../Doc/library/curses.rst:1389 #: ../Doc/library/curses.rst:1389
msgid "``KEY_SBEG``" msgid "``KEY_SBEG``"
@ -2199,7 +2199,7 @@ msgstr "``KEY_UNDO``"
#: ../Doc/library/curses.rst:1449 #: ../Doc/library/curses.rst:1449
msgid "Undo" msgid "Undo"
msgstr "" msgstr "*Undo*"
#: ../Doc/library/curses.rst:1451 #: ../Doc/library/curses.rst:1451
msgid "``KEY_MOUSE``" msgid "``KEY_MOUSE``"

View File

@ -18,7 +18,7 @@ msgstr ""
#: ../Doc/library/dis.rst:2 #: ../Doc/library/dis.rst:2
msgid ":mod:`dis` --- Disassembler for Python bytecode" msgid ":mod:`dis` --- Disassembler for Python bytecode"
msgstr "" msgstr ":mod:`dis` Désassembleur pour le code intermédiaire de Python"
#: ../Doc/library/dis.rst:7 #: ../Doc/library/dis.rst:7
msgid "**Source code:** :source:`Lib/dis.py`" msgid "**Source code:** :source:`Lib/dis.py`"
@ -31,6 +31,10 @@ msgid ""
"is defined in the file :file:`Include/opcode.h` and used by the compiler and " "is defined in the file :file:`Include/opcode.h` and used by the compiler and "
"the interpreter." "the interpreter."
msgstr "" msgstr ""
"La bibliothèque :mod:`dis` supporte l'analyse du :term:`bytecode` CPython "
"en le désassemblant. Le code intermédiaire CPython, que cette bibliothèque "
"prend en paramètre, est défini dans le fichier :file:`Include/opcode.h` et "
"est utilisé par le compilateur et l'interpréteur."
#: ../Doc/library/dis.rst:18 #: ../Doc/library/dis.rst:18
msgid "" msgid ""
@ -42,7 +46,7 @@ msgstr ""
#: ../Doc/library/dis.rst:23 #: ../Doc/library/dis.rst:23
msgid "Example: Given the function :func:`myfunc`::" msgid "Example: Given the function :func:`myfunc`::"
msgstr "" msgstr "Exemple : Etant donné la fonction :func:`myfunc` ::"
#: ../Doc/library/dis.rst:28 #: ../Doc/library/dis.rst:28
msgid "" msgid ""
@ -51,7 +55,7 @@ msgstr ""
#: ../Doc/library/dis.rst:36 #: ../Doc/library/dis.rst:36
msgid "(The \"2\" is a line number)." msgid "(The \"2\" is a line number)."
msgstr "" msgstr "(Le \"2\" est un numéro de ligne)."
#: ../Doc/library/dis.rst:38 #: ../Doc/library/dis.rst:38
msgid "The :mod:`dis` module defines the following functions and constants:" msgid "The :mod:`dis` module defines the following functions and constants:"
@ -81,37 +85,40 @@ msgstr ""
#: ../Doc/library/dis.rst:62 #: ../Doc/library/dis.rst:62
msgid "the line number, for the first instruction of each line" msgid "the line number, for the first instruction of each line"
msgstr "" msgstr "le numéro de ligne, pour la première instruction de chaque ligne"
#: ../Doc/library/dis.rst:63 #: ../Doc/library/dis.rst:63
msgid "the current instruction, indicated as ``-->``," msgid "the current instruction, indicated as ``-->``,"
msgstr "" msgstr "l'instruction en cours, indiquée par ``-->``,"
#: ../Doc/library/dis.rst:64 #: ../Doc/library/dis.rst:64
msgid "a labelled instruction, indicated with ``>>``," msgid "a labelled instruction, indicated with ``>>``,"
msgstr "" msgstr "une instruction libellée, indiquée par ``> >``,"
#: ../Doc/library/dis.rst:65 #: ../Doc/library/dis.rst:65
msgid "the address of the instruction," msgid "the address of the instruction,"
msgstr "" msgstr "l'adresse de l'instruction,"
#: ../Doc/library/dis.rst:66 #: ../Doc/library/dis.rst:66
msgid "the operation code name," msgid "the operation code name,"
msgstr "" msgstr "le nom de le code d'opération,"
#: ../Doc/library/dis.rst:67 #: ../Doc/library/dis.rst:67
msgid "operation parameters, and" msgid "operation parameters, and"
msgstr "" msgstr "paramètres de l'opération, et"
#: ../Doc/library/dis.rst:68 #: ../Doc/library/dis.rst:68
msgid "interpretation of the parameters in parentheses." msgid "interpretation of the parameters in parentheses."
msgstr "" msgstr "interprétation des paramètres entre parenthèses."
#: ../Doc/library/dis.rst:70 #: ../Doc/library/dis.rst:70
msgid "" msgid ""
"The parameter interpretation recognizes local and global variable names, " "The parameter interpretation recognizes local and global variable names, "
"constant values, branch targets, and compare operators." "constant values, branch targets, and compare operators."
msgstr "" msgstr ""
"L'interprétation du paramètre reconnaît les noms des variables locales et "
"globales, des valeurs constantes, des branchements cibles, et des opérateurs "
"de comparaison."
#: ../Doc/library/dis.rst:76 #: ../Doc/library/dis.rst:76
msgid "" msgid ""
@ -174,7 +181,7 @@ msgstr ""
#: ../Doc/library/dis.rst:146 #: ../Doc/library/dis.rst:146
msgid "Python Bytecode Instructions" msgid "Python Bytecode Instructions"
msgstr "" msgstr "Les instructions du code intermédiaire en Python"
#: ../Doc/library/dis.rst:148 #: ../Doc/library/dis.rst:148
msgid "" msgid ""

View File

@ -815,7 +815,7 @@ msgstr "Équivalent à : ::"
#: ../Doc/library/functions.rst:395 #: ../Doc/library/functions.rst:395
msgid "The *start* parameter was added." msgid "The *start* parameter was added."
msgstr "" msgstr "Ajout du paramètre *start*."
#: ../Doc/library/functions.rst:401 #: ../Doc/library/functions.rst:401
msgid "" msgid ""

View File

@ -19,6 +19,7 @@ msgstr ""
#: ../Doc/library/getopt.rst:2 #: ../Doc/library/getopt.rst:2
msgid ":mod:`getopt` --- C-style parser for command line options" msgid ":mod:`getopt` --- C-style parser for command line options"
msgstr "" msgstr ""
":mod:`getopt` Analyseur de style C pour les options de ligne de commande"
#: ../Doc/library/getopt.rst:8 #: ../Doc/library/getopt.rst:8
msgid "**Source code:** :source:`Lib/getopt.py`" msgid "**Source code:** :source:`Lib/getopt.py`"
@ -32,6 +33,12 @@ msgid ""
"write less code and get better help and error messages should consider using " "write less code and get better help and error messages should consider using "
"the :mod:`argparse` module instead." "the :mod:`argparse` module instead."
msgstr "" msgstr ""
"Le module :mod:`getopt` est un analyseur pour les options de ligne de "
"commande dont lAPI est conçue pour être familière aux utilisateurs de la "
"fonction C :c:func:`getopt`. Les utilisateurs qui ne connaissent pas la "
"fonction :c:func:`getopt` ou qui aimeraient écrire moins de code, obtenir "
"une meilleure aide et de meilleurs messages derreur devraient utiliser le "
"module :mod:`argparse`."
#: ../Doc/library/getopt.rst:20 #: ../Doc/library/getopt.rst:20
msgid "" msgid ""
@ -41,10 +48,16 @@ msgid ""
"and '``--``'). Long options similar to those supported by GNU software may " "and '``--``'). Long options similar to those supported by GNU software may "
"be used as well via an optional third argument." "be used as well via an optional third argument."
msgstr "" msgstr ""
"Ce module aide les scripts à analyser les arguments de ligne de commande "
"contenus dans ``sys.argv``. Il prend en charge les mêmes conventions que la "
"fonction UNIX :c:func:`getopt` (y compris les significations spéciales des "
"arguments de la forme ``-`` et ``--``). De longues options similaires à "
"celles prises en charge par le logiciel GNU peuvent également être utilisées "
"via un troisième argument facultatif."
#: ../Doc/library/getopt.rst:26 #: ../Doc/library/getopt.rst:26
msgid "This module provides two functions and an exception:" msgid "This module provides two functions and an exception:"
msgstr "" msgstr "Ce module fournit deux fonctions et une exception :"
#: ../Doc/library/getopt.rst:32 #: ../Doc/library/getopt.rst:32
msgid "" msgid ""
@ -62,6 +75,9 @@ msgid ""
"arguments are considered also non-options. This is similar to the way non-" "arguments are considered also non-options. This is similar to the way non-"
"GNU Unix systems work." "GNU Unix systems work."
msgstr "" msgstr ""
"Contrairement au :c:func:`getopt` GNU, après un argument n'appartenant pas à "
"une option, aucun argument ne sera considéré comme appartenant à une option. "
"Ceci est similaire à la façon dont les systèmes UNIX non-GNU fonctionnent."
#: ../Doc/library/getopt.rst:44 #: ../Doc/library/getopt.rst:44
msgid "" msgid ""
@ -89,6 +105,17 @@ msgid ""
"list in the same order in which they were found, thus allowing multiple " "list in the same order in which they were found, thus allowing multiple "
"occurrences. Long and short options may be mixed." "occurrences. Long and short options may be mixed."
msgstr "" msgstr ""
"La valeur de retour se compose de deux éléments : le premier est une liste "
"de paires ``(option, value)``, la deuxième est la liste des arguments de "
"programme laissés après que la liste doptions est été dépouillée (il sagit "
"dune tranche de fin de *args*). Chaque paire option-valeur retournée a "
"loption comme premier élément, préfixée avec un trait d'union pour les "
"options courtes (par exemple, ``'-x'``) ou deux tirets pour les options "
"longues (par exemple, ``'--long-option'``), et largument option comme "
"deuxième élément, ou une chaîne vide si le option na aucun argument. Les "
"options se trouvent dans la liste dans lordre dans lequel elles ont été "
"trouvées, permettant ainsi plusieurs occurrences. Les options longues et "
"courtes peuvent être mélangées."
#: ../Doc/library/getopt.rst:68 #: ../Doc/library/getopt.rst:68
msgid "" msgid ""
@ -97,6 +124,10 @@ msgid ""
"intermixed. The :func:`getopt` function stops processing options as soon as " "intermixed. The :func:`getopt` function stops processing options as soon as "
"a non-option argument is encountered." "a non-option argument is encountered."
msgstr "" msgstr ""
"Cette fonction fonctionne comme :func:`getopt`, sauf que le mode de *scan* "
"GNU est utilisé par défaut. Cela signifie que les arguments option et non-"
"option peuvent être **intermixés**. La fonction :func:`getopt` arrête le "
"traitement des options dès quun argument de non-option est rencontré."
#: ../Doc/library/getopt.rst:73 #: ../Doc/library/getopt.rst:73
msgid "" msgid ""
@ -104,6 +135,9 @@ msgid ""
"environment variable :envvar:`POSIXLY_CORRECT` is set, then option " "environment variable :envvar:`POSIXLY_CORRECT` is set, then option "
"processing stops as soon as a non-option argument is encountered." "processing stops as soon as a non-option argument is encountered."
msgstr "" msgstr ""
"Si le premier caractère de la chaîne doptions est ``+``, ou si la variable "
"denvironnement :envvar:`POSIXLY_CORRECT` est définie, le traitement des "
"options sarrête dès quun argument non-option est rencontré."
#: ../Doc/library/getopt.rst:82 #: ../Doc/library/getopt.rst:82
msgid "" msgid ""
@ -115,6 +149,14 @@ msgid ""
"give the error message and related option; if there is no specific option to " "give the error message and related option; if there is no specific option to "
"which the exception relates, :attr:`opt` is an empty string." "which the exception relates, :attr:`opt` is an empty string."
msgstr "" msgstr ""
"Cette exception est levée lorsquune option non reconnue est trouvée dans la "
"liste darguments ou lorsquune option nécessitant un argument nen a pas "
"reçu. Largument de lexception est une chaîne de caractères indiquant la "
"cause de lerreur. Pour les options longues, un argument donné à une option "
"qui nen exige pas un entraîne également le levage de cette exception. Les "
"attributs :attr:`msg` et :attr:`opt` donnent le message derreur et loption "
"connexe. Sil nexiste aucune option spécifique à laquelle lexception se "
"rapporte, :attr:`opt` est une chaîne vide."
#: ../Doc/library/getopt.rst:90 #: ../Doc/library/getopt.rst:90
msgid "Introduced :exc:`GetoptError` as a synonym for :exc:`error`." msgid "Introduced :exc:`GetoptError` as a synonym for :exc:`error`."
@ -122,19 +164,19 @@ msgstr ""
#: ../Doc/library/getopt.rst:96 #: ../Doc/library/getopt.rst:96
msgid "Alias for :exc:`GetoptError`; for backward compatibility." msgid "Alias for :exc:`GetoptError`; for backward compatibility."
msgstr "" msgstr "Alias pour :exc:`GetoptError` ; pour la rétrocompatibilité."
#: ../Doc/library/getopt.rst:98 #: ../Doc/library/getopt.rst:98
msgid "An example using only Unix style options:" msgid "An example using only Unix style options:"
msgstr "" msgstr "Un exemple utilisant uniquement les options de style UNIX :"
#: ../Doc/library/getopt.rst:110 #: ../Doc/library/getopt.rst:110
msgid "Using long option names is equally easy:" msgid "Using long option names is equally easy:"
msgstr "" msgstr "Lutilisation de noms doptions longs est tout aussi simple :"
#: ../Doc/library/getopt.rst:123 #: ../Doc/library/getopt.rst:123
msgid "In a script, typical usage is something like this::" msgid "In a script, typical usage is something like this::"
msgstr "" msgstr "Dans un script, lutilisation typique ressemble à ceci ::"
#: ../Doc/library/getopt.rst:152 #: ../Doc/library/getopt.rst:152
msgid "" msgid ""
@ -142,11 +184,16 @@ msgid ""
"code and more informative help and error messages by using the :mod:" "code and more informative help and error messages by using the :mod:"
"`argparse` module::" "`argparse` module::"
msgstr "" msgstr ""
"Notez quune interface de ligne de commande équivalente peut être produite "
"avec moins de code et des messages derreur et daide plus informatifs à "
"laide du module :mod:`argparse` module ::"
#: ../Doc/library/getopt.rst:167 #: ../Doc/library/getopt.rst:167
msgid "Module :mod:`argparse`" msgid "Module :mod:`argparse`"
msgstr "" msgstr "Module :mod:`argparse`"
#: ../Doc/library/getopt.rst:168 #: ../Doc/library/getopt.rst:168
msgid "Alternative command line option and argument parsing library." msgid "Alternative command line option and argument parsing library."
msgstr "" msgstr ""
"Option de ligne de commande alternative et bibliothèque danalyse "
"darguments."

View File

@ -18,7 +18,7 @@ msgstr ""
#: ../Doc/library/heapq.rst:2 #: ../Doc/library/heapq.rst:2
msgid ":mod:`heapq` --- Heap queue algorithm" msgid ":mod:`heapq` --- Heap queue algorithm"
msgstr "" msgstr ":mod:`heapq` — File de priorité basée sur un tas"
#: ../Doc/library/heapq.rst:13 #: ../Doc/library/heapq.rst:13
msgid "**Source code:** :source:`Lib/heapq.py`" msgid "**Source code:** :source:`Lib/heapq.py`"
@ -29,6 +29,8 @@ msgid ""
"This module provides an implementation of the heap queue algorithm, also " "This module provides an implementation of the heap queue algorithm, also "
"known as the priority queue algorithm." "known as the priority queue algorithm."
msgstr "" msgstr ""
"Ce module expose une implémentation de l'algorithme de file de priorité, "
"basée sur un tas."
#: ../Doc/library/heapq.rst:20 #: ../Doc/library/heapq.rst:20
msgid "" msgid ""
@ -39,6 +41,13 @@ msgid ""
"elements are considered to be infinite. The interesting property of a heap " "elements are considered to be infinite. The interesting property of a heap "
"is that its smallest element is always the root, ``heap[0]``." "is that its smallest element is always the root, ``heap[0]``."
msgstr "" msgstr ""
"Les tas sont des arbres binaires pour lesquels chaque valeur portée par un "
"nœud est inférieure ou égale à celle de ses deux fils. Cette implémentation "
"utilise des tableaux pour lesquels ``tas[k] <= tas[2*k+1]`` et ``tas[k] <= "
"tas[2*k+2]`` pour tout *k*, en commençant la numérotation à zéro. Pour "
"contenter l'opérateur de comparaison, les éléments inexistants sont "
"considérés comme porteur d'une valeur infinie. L'intérêt du tas est que son "
"plus petit élément est toujours la racine, ``tas[0]``."
#: ../Doc/library/heapq.rst:27 #: ../Doc/library/heapq.rst:27
msgid "" msgid ""
@ -50,6 +59,13 @@ msgid ""
"\"max heap\" is more common in texts because of its suitability for in-place " "\"max heap\" is more common in texts because of its suitability for in-place "
"sorting)." "sorting)."
msgstr "" msgstr ""
"L'API ci-dessous diffère de la file de priorité classique par deux aspects : "
"(a) L'indiçage commence à zéro. Cela complexifie légèrement la relation "
"entre l'indice d'un nœud et les indices de ses fils mais est alignée avec "
"l'indiçage commençant à zéro que Python utilise. (b) La méthode *pop* "
"renvoie le plus petit élément et non le plus grand (appelé « tas-min » dans "
"les manuels scolaires ; le « tas-max » étant généralement plus courant dans "
"la littérature car il permet le classement sans tampon)."
#: ../Doc/library/heapq.rst:34 #: ../Doc/library/heapq.rst:34
msgid "" msgid ""
@ -57,12 +73,18 @@ msgid ""
"surprises: ``heap[0]`` is the smallest item, and ``heap.sort()`` maintains " "surprises: ``heap[0]`` is the smallest item, and ``heap.sort()`` maintains "
"the heap invariant!" "the heap invariant!"
msgstr "" msgstr ""
"Ces deux points permettent d'aborder le tas comme une liste Python standard "
"sans surprise : ``heap[0]`` est le plus petit élément tandis que ``heap."
"sort()`` ne modifie pas le tas !"
#: ../Doc/library/heapq.rst:38 #: ../Doc/library/heapq.rst:38
msgid "" msgid ""
"To create a heap, use a list initialized to ``[]``, or you can transform a " "To create a heap, use a list initialized to ``[]``, or you can transform a "
"populated list into a heap via function :func:`heapify`." "populated list into a heap via function :func:`heapify`."
msgstr "" msgstr ""
"Pour créer un tas, utilisez une liste initialisée à ``[]`` ou bien utilisez "
"une liste existante et transformez la en tas à l'aide de la fonction :func:"
"`heapify`."
#: ../Doc/library/heapq.rst:41 #: ../Doc/library/heapq.rst:41
msgid "The following functions are provided:" msgid "The following functions are provided:"
@ -71,6 +93,8 @@ msgstr "Les fonctions suivantes sont fournies :"
#: ../Doc/library/heapq.rst:46 #: ../Doc/library/heapq.rst:46
msgid "Push the value *item* onto the *heap*, maintaining the heap invariant." msgid "Push the value *item* onto the *heap*, maintaining the heap invariant."
msgstr "" msgstr ""
"Introduit la valeur *item* dans le tas *heap*, en conservant l'invariance du "
"tas."
#: ../Doc/library/heapq.rst:51 #: ../Doc/library/heapq.rst:51
msgid "" msgid ""
@ -78,6 +102,9 @@ msgid ""
"invariant. If the heap is empty, :exc:`IndexError` is raised. To access " "invariant. If the heap is empty, :exc:`IndexError` is raised. To access "
"the smallest item without popping it, use ``heap[0]``." "the smallest item without popping it, use ``heap[0]``."
msgstr "" msgstr ""
"Extraie le plus petit élément de *heap* en préservant l'invariant du tas. Si "
"le tas est vide, une exception :exc:`IndexError` est levée. Pour accéder au "
"plus petit élément sans le retirer, utilisez ``heap[0]``."
#: ../Doc/library/heapq.rst:57 #: ../Doc/library/heapq.rst:57
msgid "" msgid ""
@ -85,10 +112,15 @@ msgid ""
"*heap*. The combined action runs more efficiently than :func:`heappush` " "*heap*. The combined action runs more efficiently than :func:`heappush` "
"followed by a separate call to :func:`heappop`." "followed by a separate call to :func:`heappop`."
msgstr "" msgstr ""
"Introduit l'élément *item* dans le tas, puis extraie le plus petit élément "
"de *heap*. Cette action combinée est plus efficace que :func:`heappush` "
"suivie par un appel séparé à :func:`heappop`."
#: ../Doc/library/heapq.rst:65 #: ../Doc/library/heapq.rst:65
msgid "Transform list *x* into a heap, in-place, in linear time." msgid "Transform list *x* into a heap, in-place, in linear time."
msgstr "" msgstr ""
"Transforme une liste *x* en un tas, sans utiliser de tampon et en temps "
"linéaire."
#: ../Doc/library/heapq.rst:70 #: ../Doc/library/heapq.rst:70
msgid "" msgid ""
@ -96,6 +128,9 @@ msgid ""
"*item*. The heap size doesn't change. If the heap is empty, :exc:" "*item*. The heap size doesn't change. If the heap is empty, :exc:"
"`IndexError` is raised." "`IndexError` is raised."
msgstr "" msgstr ""
"Extraie le plus petit élément de *heap* et introduit le nouvel élément "
"*item*. La taille du tas ne change pas. Si le tas est vide, une exception :"
"exc:`IndexError` est levée."
#: ../Doc/library/heapq.rst:73 #: ../Doc/library/heapq.rst:73
msgid "" msgid ""
@ -104,6 +139,10 @@ msgid ""
"heap. The pop/push combination always returns an element from the heap and " "heap. The pop/push combination always returns an element from the heap and "
"replaces it with *item*." "replaces it with *item*."
msgstr "" msgstr ""
"Cette opération en une étape est plus efficace qu'un appel à :func:`heappop` "
"suivi d'un appel à :func:`heappush` et est plus appropriée lorsque le tas "
"est de taille fixe. La combinaison *pop*/*push* renvoie toujours un élément "
"du tas et le remplace par *item*."
#: ../Doc/library/heapq.rst:78 #: ../Doc/library/heapq.rst:78
msgid "" msgid ""
@ -112,10 +151,15 @@ msgid ""
"combination returns the smaller of the two values, leaving the larger value " "combination returns the smaller of the two values, leaving the larger value "
"on the heap." "on the heap."
msgstr "" msgstr ""
"La valeur renvoyée peut être plus grande que l'élément *item* ajouté. Si "
"cela n'est pas souhaitable, utilisez plutôt :func:`heappushpop` à la place. "
"Sa combinaison *push*/*pop* renvoie le plus petit élément des deux valeurs "
"et laisse la plus grande sur le tas."
#: ../Doc/library/heapq.rst:84 #: ../Doc/library/heapq.rst:84
msgid "The module also offers three general purpose functions based on heaps." msgid "The module also offers three general purpose functions based on heaps."
msgstr "" msgstr ""
"Ce module contient également trois fonctions génériques utilisant les tas."
#: ../Doc/library/heapq.rst:89 #: ../Doc/library/heapq.rst:89
msgid "" msgid ""
@ -123,6 +167,9 @@ msgid ""
"timestamped entries from multiple log files). Returns an :term:`iterator` " "timestamped entries from multiple log files). Returns an :term:`iterator` "
"over the sorted values." "over the sorted values."
msgstr "" msgstr ""
"Fusionne plusieurs entrées ordonnées en une unique sortie ordonnée (par "
"exemple, fusionne des entrées datées provenant de multiples journaux "
"applicatifs). Renvoie un :term:`iterator` sur les valeurs ordonnées."
#: ../Doc/library/heapq.rst:93 #: ../Doc/library/heapq.rst:93
msgid "" msgid ""
@ -130,6 +177,9 @@ msgid ""
"does not pull the data into memory all at once, and assumes that each of the " "does not pull the data into memory all at once, and assumes that each of the "
"input streams is already sorted (smallest to largest)." "input streams is already sorted (smallest to largest)."
msgstr "" msgstr ""
"Similaire à ``sorted(itertools.chain(*iterables))`` mais renvoie un "
"itérable, ne stocke pas toutes les données en mémoire en une fois et suppose "
"que chaque flux d'entrée est déjà classé (en ordre croissant)."
#: ../Doc/library/heapq.rst:102 #: ../Doc/library/heapq.rst:102
msgid "" msgid ""
@ -160,10 +210,16 @@ msgid ""
"`max` functions. If repeated usage of these functions is required, consider " "`max` functions. If repeated usage of these functions is required, consider "
"turning the iterable into an actual heap." "turning the iterable into an actual heap."
msgstr "" msgstr ""
"Les deux fonctions précédentes sont les plus efficaces pour des petites "
"valeurs de *n*. Pour de grandes valeurs, il est préférable d'utiliser la "
"fonction :func:`sorted`. En outre, lorsque ``n==1``, il est plus efficace "
"d'utiliser les fonctions natives :func:`min` et :func:`max`. Si vous devez "
"utiliser ces fonctions de façon répétée, il est préférable de transformer "
"l'itérable en tas."
#: ../Doc/library/heapq.rst:134 #: ../Doc/library/heapq.rst:134
msgid "Basic Examples" msgid "Basic Examples"
msgstr "" msgstr "Exemples simples"
#: ../Doc/library/heapq.rst:136 #: ../Doc/library/heapq.rst:136
msgid "" msgid ""
@ -171,34 +227,47 @@ msgid ""
"pushing all values onto a heap and then popping off the smallest values one " "pushing all values onto a heap and then popping off the smallest values one "
"at a time::" "at a time::"
msgstr "" msgstr ""
"Un `tri par tas <https://fr.wikipedia.org/wiki/Tri_par_tas>`_ peut être "
"implémenté en introduisant toutes les valeurs dans un tas puis en effectuant "
"l'extraction des éléments un par un ::"
#: ../Doc/library/heapq.rst:149 #: ../Doc/library/heapq.rst:149
msgid "" msgid ""
"This is similar to ``sorted(iterable)``, but unlike :func:`sorted`, this " "This is similar to ``sorted(iterable)``, but unlike :func:`sorted`, this "
"implementation is not stable." "implementation is not stable."
msgstr "" msgstr ""
"Ceci est similaire à ``sorted(iterable)`` mais, contrairement à :func:"
"`sorted`, cette implémentation n'est pas stable."
#: ../Doc/library/heapq.rst:152 #: ../Doc/library/heapq.rst:152
msgid "" msgid ""
"Heap elements can be tuples. This is useful for assigning comparison values " "Heap elements can be tuples. This is useful for assigning comparison values "
"(such as task priorities) alongside the main record being tracked::" "(such as task priorities) alongside the main record being tracked::"
msgstr "" msgstr ""
"Les éléments d'un tas peuvent être des n-uplets. C'est pratique pour "
"assigner des valeurs de comparaison (par exemple, des priorités de tâches) "
"en plus de l'élément qui est suivi ::"
#: ../Doc/library/heapq.rst:165 #: ../Doc/library/heapq.rst:165
msgid "Priority Queue Implementation Notes" msgid "Priority Queue Implementation Notes"
msgstr "" msgstr "Notes d'implémentation de la file de priorité"
#: ../Doc/library/heapq.rst:167 #: ../Doc/library/heapq.rst:167
msgid "" msgid ""
"A `priority queue <https://en.wikipedia.org/wiki/Priority_queue>`_ is common " "A `priority queue <https://en.wikipedia.org/wiki/Priority_queue>`_ is common "
"use for a heap, and it presents several implementation challenges:" "use for a heap, and it presents several implementation challenges:"
msgstr "" msgstr ""
"Une `file de priorité <https://fr.wikipedia.org/wiki/File_de_priorit"
"%C3%A9>`_ est une application courante des tas et présente plusieurs défis "
"d'implémentation :"
#: ../Doc/library/heapq.rst:170 #: ../Doc/library/heapq.rst:170
msgid "" msgid ""
"Sort stability: how do you get two tasks with equal priorities to be " "Sort stability: how do you get two tasks with equal priorities to be "
"returned in the order they were originally added?" "returned in the order they were originally added?"
msgstr "" msgstr ""
"Stabilité du classement : comment s'assurer que deux tâches avec la même "
"priorité sont renvoyées dans l'ordre de leur ajout ?"
#: ../Doc/library/heapq.rst:173 #: ../Doc/library/heapq.rst:173
msgid "" msgid ""
@ -212,12 +281,16 @@ msgid ""
"If the priority of a task changes, how do you move it to a new position in " "If the priority of a task changes, how do you move it to a new position in "
"the heap?" "the heap?"
msgstr "" msgstr ""
"Si la priorité d'une tâche change, comment la déplacer à sa nouvelle "
"position dans le tas ?"
#: ../Doc/library/heapq.rst:180 #: ../Doc/library/heapq.rst:180
msgid "" msgid ""
"Or if a pending task needs to be deleted, how do you find it and remove it " "Or if a pending task needs to be deleted, how do you find it and remove it "
"from the queue?" "from the queue?"
msgstr "" msgstr ""
"Si une tâche en attente doit être supprimée, comment la trouver et la "
"supprimer de la file ?"
#: ../Doc/library/heapq.rst:183 #: ../Doc/library/heapq.rst:183
msgid "" msgid ""
@ -227,6 +300,13 @@ msgid ""
"returned in the order they were added. And since no two entry counts are the " "returned in the order they were added. And since no two entry counts are the "
"same, the tuple comparison will never attempt to directly compare two tasks." "same, the tuple comparison will never attempt to directly compare two tasks."
msgstr "" msgstr ""
"Une solution aux deux premiers problèmes consiste à stocker les entrées sous "
"forme de liste à 3 éléments incluant la priorité, le numéro d'ajout et la "
"tâche. Le numéro d'ajout sert à briser les égalités de telle sorte que deux "
"tâches avec la même priorité sont renvoyées dans l'ordre de leur insertion. "
"Puisque deux tâches ne peuvent jamais avoir le même numéro d'ajout, la "
"comparaison des triplets ne va jamais chercher à comparer des tâches entre "
"elles."
#: ../Doc/library/heapq.rst:189 #: ../Doc/library/heapq.rst:189
msgid "" msgid ""
@ -234,6 +314,9 @@ msgid ""
"changes to its priority or removing it entirely. Finding a task can be done " "changes to its priority or removing it entirely. Finding a task can be done "
"with a dictionary pointing to an entry in the queue." "with a dictionary pointing to an entry in the queue."
msgstr "" msgstr ""
"Le problème restant consiste à trouver une tâche en attente et modifier sa "
"priorité ou la supprimer. Trouver une tâche peut être réalisé à l'aide d'un "
"dictionnaire pointant vers une entrée dans la file."
#: ../Doc/library/heapq.rst:193 #: ../Doc/library/heapq.rst:193
msgid "" msgid ""
@ -245,7 +328,7 @@ msgstr ""
#: ../Doc/library/heapq.rst:227 #: ../Doc/library/heapq.rst:227
msgid "Theory" msgid "Theory"
msgstr "" msgstr "Théorie"
#: ../Doc/library/heapq.rst:229 #: ../Doc/library/heapq.rst:229
msgid "" msgid ""
@ -254,12 +337,19 @@ msgid ""
"elements are considered to be infinite. The interesting property of a heap " "elements are considered to be infinite. The interesting property of a heap "
"is that ``a[0]`` is always its smallest element." "is that ``a[0]`` is always its smallest element."
msgstr "" msgstr ""
"Les tas sont des tableaux pour lesquels ``a[k] <= a[2*k+1]`` et ``a[k] <= "
"a[2*k+2]`` pour tout *k* en comptant les éléments à partir de 0. Pour "
"simplifier la comparaison, les éléments inexistants sont considérés comme "
"étant infinis. L'intérêt des tas est que ``a[0]`` est toujours leur plus "
"petit élément."
#: ../Doc/library/heapq.rst:234 #: ../Doc/library/heapq.rst:234
msgid "" msgid ""
"The strange invariant above is meant to be an efficient memory " "The strange invariant above is meant to be an efficient memory "
"representation for a tournament. The numbers below are *k*, not ``a[k]``::" "representation for a tournament. The numbers below are *k*, not ``a[k]``::"
msgstr "" msgstr ""
"L'invariant étrange ci-dessus est une représentation efficace en mémoire "
"d'un tournoi. Les nombres ci-dessous sont *k* et non ``a[k]`` ::"
#: ../Doc/library/heapq.rst:247 #: ../Doc/library/heapq.rst:247
msgid "" msgid ""
@ -273,6 +363,17 @@ msgid ""
"two cells it tops contain three different items, but the top cell \"wins\" " "two cells it tops contain three different items, but the top cell \"wins\" "
"over the two topped cells." "over the two topped cells."
msgstr "" msgstr ""
"Dans l'arbre ci-dessus, chaque nœud *k* a pour enfants ``2*k+1`` et ``2*k"
"+2``. Dans les tournois binaires habituels dans les compétitions sportives, "
"chaque nœud est le vainqueur des deux nœuds inférieurs et nous pouvons "
"tracer le chemin du vainqueur le long de l'arbre afin de voir qui étaient "
"ses adversaires. Cependant, dans de nombreuses applications informatiques de "
"ces tournois, nous n'avons pas besoin de produire l'historique du vainqueur. "
"Afin d'occuper moins de mémoire, on remplace le vainqueur lors de sa "
"promotion par un autre élément à un plus bas niveau. La règle devient alors "
"qu'un nœud et les deux nœuds qu'il chapeaute contiennent trois éléments "
"différents, mais le nœud supérieur « gagne » contre les deux nœuds "
"inférieurs."
#: ../Doc/library/heapq.rst:256 #: ../Doc/library/heapq.rst:256
msgid "" msgid ""
@ -284,6 +385,15 @@ msgid ""
"logarithmic on the total number of items in the tree. By iterating over all " "logarithmic on the total number of items in the tree. By iterating over all "
"items, you get an O(n log n) sort." "items, you get an O(n log n) sort."
msgstr "" msgstr ""
"Si cet invariant de tas est vérifié à tout instant, alors l'élément à "
"l'indice 0 est le vainqueur global. L'algorithme le plus simple pour le "
"retirer et trouver le vainqueur « suivant » consiste à déplacer un perdant "
"(par exemple le nœud 30 dans le diagramme ci-dessus) à la position 0, puis à "
"faire redescendre cette nouvelle racine dans l'arbre en échangeant sa valeur "
"avec celle d'un de ses fils jusqu'à ce que l'invariant soit rétabli. Cette "
"approche a un coût logarithmique par rapport au nombre total d'éléments dans "
"l'arbre. En itérant sur tous les éléments, le classement s'effectue en O(n "
"log n) opérations."
#: ../Doc/library/heapq.rst:263 #: ../Doc/library/heapq.rst:263
msgid "" msgid ""
@ -296,6 +406,16 @@ msgid ""
"easily go into the heap. So, a heap is a good structure for implementing " "easily go into the heap. So, a heap is a good structure for implementing "
"schedulers (this is what I used for my MIDI sequencer :-)." "schedulers (this is what I used for my MIDI sequencer :-)."
msgstr "" msgstr ""
"Une propriété agréable de cet algorithme est qu'il possible d'insérer "
"efficacement de nouveaux éléments en cours de classement, du moment que les "
"éléments insérés ne sont pas « meilleurs » que le dernier élément qui a été "
"extrait. Ceci s'avère très utile dans des simulations où l'arbre contient la "
"liste des événements arrivants et que la condition de « victoire » est le "
"plus petit temps d'exécution planifié. Lorsqu'un événement programme "
"l'exécution d'autres événements, ceux-ci sont planifiés pour le futur et "
"peuvent donc rejoindre le tas. Ainsi, le tas est une bonne structure pour "
"implémenter un ordonnanceur (et c'est ce que j'ai utilisé pour mon "
"séquenceur MIDI ☺)."
#: ../Doc/library/heapq.rst:272 #: ../Doc/library/heapq.rst:272
msgid "" msgid ""
@ -305,6 +425,11 @@ msgid ""
"average case. However, there are other representations which are more " "average case. However, there are other representations which are more "
"efficient overall, yet the worst cases might be terrible." "efficient overall, yet the worst cases might be terrible."
msgstr "" msgstr ""
"Plusieurs structures ont été étudiées en détail pour implémenter des "
"ordonnanceurs et les tas sont bien adaptés : ils sont raisonnablement "
"rapides, leur vitesse est presque constante et le pire cas ne diffère pas "
"trop du cas moyen. S'il existe des représentations qui sont plus efficaces "
"en général, les pires cas peuvent être terriblement mauvais."
#: ../Doc/library/heapq.rst:278 #: ../Doc/library/heapq.rst:278
msgid "" msgid ""
@ -319,6 +444,18 @@ msgid ""
"which are twice the size of the memory for random input, and much better for " "which are twice the size of the memory for random input, and much better for "
"input fuzzily ordered." "input fuzzily ordered."
msgstr "" msgstr ""
"Les tas sont également très utiles pour ordonner les données sur de gros "
"disques. Vous savez probablement qu'un gros tri implique la production de "
"séquences pré-classées (dont la taille est généralement liée à la quantité "
"de mémoire CPU disponible), suivie par une passe de fusion qui est "
"généralement organisée de façon très intelligente [#]_. Il est très "
"important que le classement initial produise des séquences les plus longues "
"possibles. Les tournois sont une bonne façon d'arriver à ce résultat. Si, en "
"utilisant toute la mémoire disponible pour stocker un tournoi, vous "
"remplacez et faites percoler les éléments qui s'avèrent acceptables pour la "
"séquence courante, vous produirez des séquences d'une taille égale au double "
"de la mémoire pour une entrée aléatoire et bien mieux pour une entrée "
"approximativement triée."
#: ../Doc/library/heapq.rst:288 #: ../Doc/library/heapq.rst:288
msgid "" msgid ""
@ -330,12 +467,23 @@ msgid ""
"the first heap is melting. When the first heap completely vanishes, you " "the first heap is melting. When the first heap completely vanishes, you "
"switch heaps and start a new run. Clever and quite effective!" "switch heaps and start a new run. Clever and quite effective!"
msgstr "" msgstr ""
"Qui plus est, si vous écrivez l'élément 0 sur le disque et que vous recevez "
"en entrée un élément qui n'est pas adapté au tournoi actuel (parce que sa "
"valeur « gagne » par rapport à la dernière valeur de sortie), alors il ne "
"peut pas être stocké dans le tas donc la taille de ce dernier diminue. La "
"mémoire libérée peut être réutilisée immédiatement pour progressivement "
"construire un deuxième tas, qui croit à la même vitesse que le premier "
"décroît. Lorsque le premier tas a complètement disparu, vous échangez les "
"tas et démarrez une nouvelle séquence. Malin et plutôt efficace !"
#: ../Doc/library/heapq.rst:296 #: ../Doc/library/heapq.rst:296
msgid "" msgid ""
"In a word, heaps are useful memory structures to know. I use them in a few " "In a word, heaps are useful memory structures to know. I use them in a few "
"applications, and I think it is good to keep a 'heap' module around. :-)" "applications, and I think it is good to keep a 'heap' module around. :-)"
msgstr "" msgstr ""
"Pour résumer, les tas sont des structures de données qu'il est bon de "
"connaître. Je les utilise dans quelques applications et je pense qu'il est "
"bon de garder le module *heap* sous le coude. ☺"
#: ../Doc/library/heapq.rst:300 #: ../Doc/library/heapq.rst:300
msgid "Footnotes" msgid "Footnotes"
@ -353,3 +501,14 @@ msgid ""
"Believe me, real good tape sorts were quite spectacular to watch! From all " "Believe me, real good tape sorts were quite spectacular to watch! From all "
"times, sorting has always been a Great Art! :-)" "times, sorting has always been a Great Art! :-)"
msgstr "" msgstr ""
"Les algorithmes de répartition de charge pour les disques, courants de nos "
"jours, sont plus embêtants qu'utiles, en raison de la capacité des disques à "
"réaliser des accès aléatoires. Sur les périphériques qui ne peuvent faire "
"que de la lecture séquentielle, comme les gros lecteurs à bandes, le besoin "
"était différent et il fallait être malin pour s'assurer (bien à l'avance) "
"que chaque mouvement de bande serait le plus efficace possible (c'est-à-dire "
"participerait au mieux à l'« avancée » de la fusion). Certaines cassettes "
"pouvaient même lire à l'envers et cela était aussi utilisé pour éviter de "
"remonter dans le temps. Croyez-moi, les bons tris sur bandes étaient "
"spectaculaires à regarder ! Depuis la nuit des temps, trier a toujours été "
"le Grand Art ! ☺"

File diff suppressed because it is too large Load Diff

View File

@ -1206,7 +1206,7 @@ msgstr ""
#: ../Doc/library/io.rst:880 #: ../Doc/library/io.rst:880
msgid "Performance" msgid "Performance"
msgstr "" msgstr "Performances"
#: ../Doc/library/io.rst:883 #: ../Doc/library/io.rst:883
msgid "Binary I/O" msgid "Binary I/O"

View File

@ -18,7 +18,7 @@ msgstr ""
#: ../Doc/library/numbers.rst:2 #: ../Doc/library/numbers.rst:2
msgid ":mod:`numbers` --- Numeric abstract base classes" msgid ":mod:`numbers` --- Numeric abstract base classes"
msgstr "" msgstr ":mod:`numbers` — Classes de base abstraites numériques"
#: ../Doc/library/numbers.rst:10 #: ../Doc/library/numbers.rst:10
msgid "" msgid ""
@ -27,16 +27,23 @@ msgid ""
"more operations. None of the types defined in this module can be " "more operations. None of the types defined in this module can be "
"instantiated." "instantiated."
msgstr "" msgstr ""
"Le module :mod:`numbers` (:pep:`3141`) définit une hiérarchie de :term:"
"`classes de base abstraites<abstract base class>` numériques qui définissent "
"progressivement plus d'opérations. Aucun des types définis dans ce module ne "
"peut être instancié."
#: ../Doc/library/numbers.rst:17 #: ../Doc/library/numbers.rst:17
msgid "" msgid ""
"The root of the numeric hierarchy. If you just want to check if an argument " "The root of the numeric hierarchy. If you just want to check if an argument "
"*x* is a number, without caring what kind, use ``isinstance(x, Number)``." "*x* is a number, without caring what kind, use ``isinstance(x, Number)``."
msgstr "" msgstr ""
"La base de la hiérarchie numérique. Si vous voulez juste vérifier qu'un "
"argument *x* est un nombre, peu importe le type, utilisez ``isinstance(x, "
"Number)``."
#: ../Doc/library/numbers.rst:22 #: ../Doc/library/numbers.rst:22
msgid "The numeric tower" msgid "The numeric tower"
msgstr "" msgstr "La tour numérique"
#: ../Doc/library/numbers.rst:26 #: ../Doc/library/numbers.rst:26
msgid "" msgid ""
@ -46,26 +53,35 @@ msgid ""
"``, ``*``, ``/``, :func:`abs`, :meth:`conjugate`, ``==``, and ``!=``. All " "``, ``*``, ``/``, :func:`abs`, :meth:`conjugate`, ``==``, and ``!=``. All "
"except ``-`` and ``!=`` are abstract." "except ``-`` and ``!=`` are abstract."
msgstr "" msgstr ""
"Les sous-classes de ce type décrivent des nombres complexes et incluent les "
"opérations qui fonctionnent sur le type natif :class:`complex`. Ce sont : "
"les conversions vers :class:`complex` et :class:`bool`, :attr:`.real`, :attr:"
"`.imag`, ``+``, ``-``, ``*``, ``/``, :func:`abs`, :meth:`conjugate`, ``==`` "
"et ``!=``. Toutes sauf ``-`` et ``!=`` sont abstraites."
#: ../Doc/library/numbers.rst:34 #: ../Doc/library/numbers.rst:34
msgid "Abstract. Retrieves the real component of this number." msgid "Abstract. Retrieves the real component of this number."
msgstr "" msgstr "Abstrait. Récupère la partie réelle de ce nombre."
#: ../Doc/library/numbers.rst:38 #: ../Doc/library/numbers.rst:38
msgid "Abstract. Retrieves the imaginary component of this number." msgid "Abstract. Retrieves the imaginary component of this number."
msgstr "" msgstr "Abstrait. Retrouve la partie imaginaire de ce nombre."
#: ../Doc/library/numbers.rst:42 #: ../Doc/library/numbers.rst:42
msgid "" msgid ""
"Abstract. Returns the complex conjugate. For example, ``(1+3j).conjugate() " "Abstract. Returns the complex conjugate. For example, ``(1+3j).conjugate() "
"== (1-3j)``." "== (1-3j)``."
msgstr "" msgstr ""
"Abstrait. Renvoie le complexe conjugué. Par exemple, ``(1+3j).conjugate() == "
"(1-3j)``."
#: ../Doc/library/numbers.rst:47 #: ../Doc/library/numbers.rst:47
msgid "" msgid ""
"To :class:`Complex`, :class:`Real` adds the operations that work on real " "To :class:`Complex`, :class:`Real` adds the operations that work on real "
"numbers." "numbers."
msgstr "" msgstr ""
":class:`Real` ajoute les opérations qui fonctionnent sur les nombres réels "
"à :class:`Complex`."
#: ../Doc/library/numbers.rst:50 #: ../Doc/library/numbers.rst:50
msgid "" msgid ""
@ -73,12 +89,17 @@ msgid ""
"func:`round`, :func:`math.floor`, :func:`math.ceil`, :func:`divmod`, ``//``, " "func:`round`, :func:`math.floor`, :func:`math.ceil`, :func:`divmod`, ``//``, "
"``%``, ``<``, ``<=``, ``>``, and ``>=``." "``%``, ``<``, ``<=``, ``>``, and ``>=``."
msgstr "" msgstr ""
"En bref, celles-ci sont : une conversion vers :class:`float`, :func:`math."
"trunc`, :func:`round`, :func:`math.floor`, :func:`math.ceil`, :func:"
"`divmod`, ``//``, ``%``, ``<``, ``<=``, ``>`` et ``>=``."
#: ../Doc/library/numbers.rst:54 #: ../Doc/library/numbers.rst:54
msgid "" msgid ""
"Real also provides defaults for :func:`complex`, :attr:`~Complex.real`, :" "Real also provides defaults for :func:`complex`, :attr:`~Complex.real`, :"
"attr:`~Complex.imag`, and :meth:`~Complex.conjugate`." "attr:`~Complex.imag`, and :meth:`~Complex.conjugate`."
msgstr "" msgstr ""
"*Real* fournit également des valeurs par défaut pour :func:`complex`, :attr:"
"`~Complex.real`, :attr:`~Complex.imag` et :meth:`~Complex.conjugate`."
#: ../Doc/library/numbers.rst:60 #: ../Doc/library/numbers.rst:60
msgid "" msgid ""
@ -86,6 +107,9 @@ msgid ""
"`~Rational.denominator` properties, which should be in lowest terms. With " "`~Rational.denominator` properties, which should be in lowest terms. With "
"these, it provides a default for :func:`float`." "these, it provides a default for :func:`float`."
msgstr "" msgstr ""
"Dérive :class:`Real` et ajoute les propriétés :attr:`~Rational.numerator` "
"et :attr:`~Rational.denominator` qui doivent être les plus petits possible. "
"Avec celles-ci, il fournit une valeur par défaut pour :func:`float`."
#: ../Doc/library/numbers.rst:67 ../Doc/library/numbers.rst:71 #: ../Doc/library/numbers.rst:67 ../Doc/library/numbers.rst:71
msgid "Abstract." msgid "Abstract."
@ -98,10 +122,15 @@ msgid ""
"`~Rational.denominator`. Adds abstract methods for ``**`` and bit-string " "`~Rational.denominator`. Adds abstract methods for ``**`` and bit-string "
"operations: ``<<``, ``>>``, ``&``, ``^``, ``|``, ``~``." "operations: ``<<``, ``>>``, ``&``, ``^``, ``|``, ``~``."
msgstr "" msgstr ""
"Dérive :class:`Rational` et ajoute une conversion en :class:`int`. Fournit "
"des valeurs par défaut pour :func:`float`, :attr:`~Rational.numerator` et :"
"attr:`~Rational.denominator`. Ajoute des méthodes abstraites pour ``**`` et "
"les opérations au niveau des bits: ``<<``, ``>>``, ``&``, ``^``, ``|``, "
"``~``."
#: ../Doc/library/numbers.rst:83 #: ../Doc/library/numbers.rst:83
msgid "Notes for type implementors" msgid "Notes for type implementors"
msgstr "" msgstr "Notes pour implémenter des types"
#: ../Doc/library/numbers.rst:85 #: ../Doc/library/numbers.rst:85
msgid "" msgid ""
@ -110,10 +139,15 @@ msgid ""
"the real numbers. For example, :class:`fractions.Fraction` implements :func:" "the real numbers. For example, :class:`fractions.Fraction` implements :func:"
"`hash` as follows::" "`hash` as follows::"
msgstr "" msgstr ""
"Les développeurs doivent veiller à ce que des nombres égaux soient bien "
"égaux lors de comparaisons et à ce qu'ils soient hachés aux mêmes valeurs. "
"Cela peut être subtil s'il y a deux dérivations différentes des nombres "
"réels. Par exemple, :class:`fractions.Fraction` implémente :func:`hash` "
"comme suit ::"
#: ../Doc/library/numbers.rst:104 #: ../Doc/library/numbers.rst:104
msgid "Adding More Numeric ABCs" msgid "Adding More Numeric ABCs"
msgstr "" msgstr "Ajouter plus d'ABC numériques"
#: ../Doc/library/numbers.rst:106 #: ../Doc/library/numbers.rst:106
msgid "" msgid ""
@ -121,10 +155,14 @@ msgid ""
"poor hierarchy if it precluded the possibility of adding those. You can add " "poor hierarchy if it precluded the possibility of adding those. You can add "
"``MyFoo`` between :class:`Complex` and :class:`Real` with::" "``MyFoo`` between :class:`Complex` and :class:`Real` with::"
msgstr "" msgstr ""
"Il est bien entendu possible de créer davantage dABC pour les nombres et "
"cette hiérarchie serait médiocre si elle excluait la possibilité d'en "
"ajouter. Vous pouvez ajouter ``MyFoo`` entre :class:`Complex` et :class:"
"`Real` ainsi ::"
#: ../Doc/library/numbers.rst:116 #: ../Doc/library/numbers.rst:116
msgid "Implementing the arithmetic operations" msgid "Implementing the arithmetic operations"
msgstr "" msgstr "Implémentation des opérations arithmétiques"
#: ../Doc/library/numbers.rst:118 #: ../Doc/library/numbers.rst:118
msgid "" msgid ""
@ -134,6 +172,12 @@ msgid ""
"there. For subtypes of :class:`Integral`, this means that :meth:`__add__` " "there. For subtypes of :class:`Integral`, this means that :meth:`__add__` "
"and :meth:`__radd__` should be defined as::" "and :meth:`__radd__` should be defined as::"
msgstr "" msgstr ""
"Nous voulons implémenter les opérations arithmétiques de sorte que les "
"opérations en mode mixte appellent une implémentation dont l'auteur connaît "
"les types des deux arguments, ou convertissent chacun dans le type natif le "
"plus proche et effectuent l'opération sur ces types. Pour les sous-types de :"
"class:`Integral`, cela signifie que :meth:`__add__` et :meth:`__radd__` "
"devraient être définis comme suit ::"
#: ../Doc/library/numbers.rst:149 #: ../Doc/library/numbers.rst:149
msgid "" msgid ""
@ -143,10 +187,16 @@ msgid ""
"an instance of ``A``, which is a subtype of :class:`Complex` (``a : A <: " "an instance of ``A``, which is a subtype of :class:`Complex` (``a : A <: "
"Complex``), and ``b : B <: Complex``. I'll consider ``a + b``:" "Complex``), and ``b : B <: Complex``. I'll consider ``a + b``:"
msgstr "" msgstr ""
"Il existe 5 cas différents pour une opération de type mixte sur des sous-"
"classes de :class:`Complex`. Nous nous référerons à tout le code ci-dessus "
"qui ne se réfère pas à ``MyIntegral`` et ``OtherTypeIKnowAbout`` comme "
"\"expression générique\". ``a`` est une instance de ``A``, qui est un sous-"
"type de :class:`Complex` (``a : A <: Complex``) et ``b : B <: Complex``. "
"Considérons ``a + b``:"
#: ../Doc/library/numbers.rst:156 #: ../Doc/library/numbers.rst:156
msgid "If ``A`` defines an :meth:`__add__` which accepts ``b``, all is well." msgid "If ``A`` defines an :meth:`__add__` which accepts ``b``, all is well."
msgstr "" msgstr "Si ``A`` définit une :meth:`__add__` qui accepte ``b``, tout va bien."
#: ../Doc/library/numbers.rst:158 #: ../Doc/library/numbers.rst:158
msgid "" msgid ""
@ -156,18 +206,27 @@ msgid ""
"`NotImplemented` from :meth:`__add__`. (Or ``A`` may not implement :meth:" "`NotImplemented` from :meth:`__add__`. (Or ``A`` may not implement :meth:"
"`__add__` at all.)" "`__add__` at all.)"
msgstr "" msgstr ""
"Si ``A`` fait appel au code générique et que celui-ci renvoie une valeur de :"
"meth:`__add__`, nous manquons la possibilité que ``B`` définisse une :meth:"
"`__radd__` plus intelligent, donc le code générique devrait retourner :const:"
"`NotImplemented` dans :meth:`__add__` (ou alors ``A`` ne doit pas "
"implémenter :meth:`__add__` du tout.)"
#: ../Doc/library/numbers.rst:164 #: ../Doc/library/numbers.rst:164
msgid "" msgid ""
"Then ``B``'s :meth:`__radd__` gets a chance. If it accepts ``a``, all is " "Then ``B``'s :meth:`__radd__` gets a chance. If it accepts ``a``, all is "
"well." "well."
msgstr "" msgstr ""
"Alors :meth:`__radd__` de ``B`` a une chance. si elle accepte ``a``, tout va "
"bien."
#: ../Doc/library/numbers.rst:166 #: ../Doc/library/numbers.rst:166
msgid "" msgid ""
"If it falls back to the boilerplate, there are no more possible methods to " "If it falls back to the boilerplate, there are no more possible methods to "
"try, so this is where the default implementation should live." "try, so this is where the default implementation should live."
msgstr "" msgstr ""
"Si elle fait appel au code générique, il n'y a plus de méthode possible à "
"essayer, c'est donc ici que l'implémentation par défaut intervient."
#: ../Doc/library/numbers.rst:169 #: ../Doc/library/numbers.rst:169
msgid "" msgid ""
@ -175,6 +234,9 @@ msgid ""
"because it was implemented with knowledge of ``A``, so it can handle those " "because it was implemented with knowledge of ``A``, so it can handle those "
"instances before delegating to :class:`Complex`." "instances before delegating to :class:`Complex`."
msgstr "" msgstr ""
"Si ``B < : A```, Python essaie ``B.__radd__`` avant ``A.__add__``. C'est "
"valable parce qu'elle est implémentée avec la connaissance de ``A``, donc "
"elle peut gérer ces instances avant de déléguer à :class:`Complex`."
#: ../Doc/library/numbers.rst:174 #: ../Doc/library/numbers.rst:174
msgid "" msgid ""
@ -182,6 +244,9 @@ msgid ""
"then the appropriate shared operation is the one involving the built in :" "then the appropriate shared operation is the one involving the built in :"
"class:`complex`, and both :meth:`__radd__` s land there, so ``a+b == b+a``." "class:`complex`, and both :meth:`__radd__` s land there, so ``a+b == b+a``."
msgstr "" msgstr ""
"Si ``A <: Complex`` et ``B <: Real`` sans autre information, alors "
"l'opération commune appropriée est celle impliquant :class:`complex` et les "
"deux :meth:`__radd__` atterrissent à cet endroit, donc ``a+b == b+a``."
#: ../Doc/library/numbers.rst:179 #: ../Doc/library/numbers.rst:179
msgid "" msgid ""
@ -190,3 +255,7 @@ msgid ""
"reverse instances of any given operator. For example, :class:`fractions." "reverse instances of any given operator. For example, :class:`fractions."
"Fraction` uses::" "Fraction` uses::"
msgstr "" msgstr ""
"Comme la plupart des opérations sur un type donné seront très similaires, il "
"peut être utile de définir une fonction accessoire qui génère les instances "
"résultantes et inverses d'un opérateur donné. Par exemple, :class:`fractions."
"Fraction` utilise ::"

View File

@ -18,7 +18,7 @@ msgstr ""
#: ../Doc/library/os.path.rst:2 #: ../Doc/library/os.path.rst:2
msgid ":mod:`os.path` --- Common pathname manipulations" msgid ":mod:`os.path` --- Common pathname manipulations"
msgstr "" msgstr ":mod:`os.path` — manipulation courante des chemins"
#: ../Doc/library/os.path.rst:9 #: ../Doc/library/os.path.rst:9
msgid "" msgid ""
@ -40,6 +40,11 @@ msgid ""
"explicitly when an application desires shell-like path expansion. (See also " "explicitly when an application desires shell-like path expansion. (See also "
"the :mod:`glob` module.)" "the :mod:`glob` module.)"
msgstr "" msgstr ""
"Contrairement à une invite de commandes Unix, Python ne fait aucune "
"extension de chemin *automatique*. Des fonctions telles que :func:"
"`expanduser` et :func:`expandvars` peuvent être appelées explicitement "
"lorsqu'une application souhaite une extension de chemin semblable à celui "
"d'une invite de commande (voir aussi le module :mod:`glob`)."
#: ../Doc/library/os.path.rst:26 #: ../Doc/library/os.path.rst:26
msgid "" msgid ""
@ -51,14 +56,21 @@ msgid ""
"path that is *always* in one of the different formats. They all have the " "path that is *always* in one of the different formats. They all have the "
"same interface:" "same interface:"
msgstr "" msgstr ""
"Comme les différents systèmes d'exploitation ont des conventions de noms de "
"chemins différentes, il existe plusieurs versions de ce module dans la "
"bibliothèque standard. Le module :mod:`os.path` est toujours le module de "
"chemin adapté au système d'exploitation sur lequel Python tourne, et donc "
"adapté pour les chemins locaux. Cependant, vous pouvez également importer et "
"utiliser les modules individuels si vous voulez manipuler un chemin qui est "
"*toujours* dans l'un des différents formats. Ils ont tous la même interface :"
#: ../Doc/library/os.path.rst:34 #: ../Doc/library/os.path.rst:34
msgid ":mod:`posixpath` for UNIX-style paths" msgid ":mod:`posixpath` for UNIX-style paths"
msgstr "" msgstr ":mod:`posixpath` pour les chemins de type UNIX"
#: ../Doc/library/os.path.rst:35 #: ../Doc/library/os.path.rst:35
msgid ":mod:`ntpath` for Windows paths" msgid ":mod:`ntpath` for Windows paths"
msgstr "" msgstr ":mod:`ntpath` pour les chemins Windows"
#: ../Doc/library/os.path.rst:36 #: ../Doc/library/os.path.rst:36
msgid ":mod:`macpath` for old-style MacOS paths" msgid ":mod:`macpath` for old-style MacOS paths"
@ -74,6 +86,9 @@ msgid ""
"platforms, this is equivalent to calling the function :func:`normpath` as " "platforms, this is equivalent to calling the function :func:`normpath` as "
"follows: ``normpath(join(os.getcwd(), path))``." "follows: ``normpath(join(os.getcwd(), path))``."
msgstr "" msgstr ""
"Renvoie une version absolue et normalisée du chemin d'accès *path*. Sur la "
"plupart des plates-formes, cela équivaut à appeler la fonction :func:"
"`normpath` comme suit : ``normpath(join(os.getcwd(), chemin))```."
#: ../Doc/library/os.path.rst:51 #: ../Doc/library/os.path.rst:51
msgid "" msgid ""
@ -83,6 +98,11 @@ msgid ""
"program; where :program:`basename` for ``'/foo/bar/'`` returns ``'bar'``, " "program; where :program:`basename` for ``'/foo/bar/'`` returns ``'bar'``, "
"the :func:`basename` function returns an empty string (``''``)." "the :func:`basename` function returns an empty string (``''``)."
msgstr "" msgstr ""
"Renvoie le nom de base du chemin d'accès *path*. C'est le second élément de "
"la paire renvoyée en passant *path* à la fonction :func:`split`. Notez que "
"le résultat de cette fonction est différent de celui du programme Unix :"
"program:`basename` ; là où :program:`basename` pour ``'/foo/bar/'`` renvoie "
"``'bar'``, la fonction :func:`basename` renvoie une chaîne vide (``''``)."
#: ../Doc/library/os.path.rst:61 #: ../Doc/library/os.path.rst:61
msgid "" msgid ""

View File

@ -18,7 +18,7 @@ msgstr ""
#: ../Doc/library/parser.rst:3 #: ../Doc/library/parser.rst:3
msgid ":mod:`parser` --- Access Python parse trees" msgid ":mod:`parser` --- Access Python parse trees"
msgstr "" msgstr ":mod:`parser` — Accès aux arbres syntaxiques"
#: ../Doc/library/parser.rst:20 #: ../Doc/library/parser.rst:20
msgid "" msgid ""
@ -30,6 +30,13 @@ msgid ""
"in a manner identical to the code forming the application. It is also " "in a manner identical to the code forming the application. It is also "
"faster." "faster."
msgstr "" msgstr ""
"Le module :mod:`parser` expose une interface à l'analyseur et au compilateur "
"de byte-code internes de Python. Son objectif principal est de permettre à "
"du code Python de modifier l'arbre syntaxique d'une expression Python puis "
"de la rendre exécutable. Cette approche est plus fiable que celle consistant "
"à manipuler des chaines de caractères, puisque l'analyse est faite avec le "
"même analyseur que celui utilisé pour le code de l'application. C'est aussi "
"plus rapide."
#: ../Doc/library/parser.rst:29 #: ../Doc/library/parser.rst:29
msgid "" msgid ""
@ -37,6 +44,9 @@ msgid ""
"Syntax Tree (AST) generation and compilation stage, using the :mod:`ast` " "Syntax Tree (AST) generation and compilation stage, using the :mod:`ast` "
"module." "module."
msgstr "" msgstr ""
"À partir de Python 2.5, il est plus pratique de faire ces manipulations "
"entre la génération de l'AST (*Abstract Syntax Tree*) et la compilation, en "
"utilisant le module :mod:`ast`."
#: ../Doc/library/parser.rst:33 #: ../Doc/library/parser.rst:33
msgid "" msgid ""
@ -54,6 +64,10 @@ msgid ""
"editing the parse trees for Python code, but some examples of using the :mod:" "editing the parse trees for Python code, but some examples of using the :mod:"
"`parser` module are presented." "`parser` module are presented."
msgstr "" msgstr ""
"Certaines particularités de ce module sont importantes à retenir pour en "
"faire un bon usage. Ce n'est pas un tutoriel sur la modification d'arbres "
"syntaxiques Python, mais certains exemples d'utilisation du module :mod:"
"`parser` sont présentés."
#: ../Doc/library/parser.rst:44 #: ../Doc/library/parser.rst:44
msgid "" msgid ""

View File

@ -31,6 +31,10 @@ msgid ""
"support file copying and removal. For operations on individual files, see " "support file copying and removal. For operations on individual files, see "
"also the :mod:`os` module." "also the :mod:`os` module."
msgstr "" msgstr ""
"Le module :mod:`shutil` propose des opérations de haut niveau sur les "
"fichiers et ensembles de fichiers. En particulier, des fonctions pour copier "
"et déplacer les fichiers sont proposées. Pour les opérations individuelles "
"sur les fichiers, reportez-vous au module :mod:`os`."
#: ../Doc/library/shutil.rst:24 #: ../Doc/library/shutil.rst:24
msgid "" msgid ""
@ -46,10 +50,16 @@ msgid ""
"be correct. On Windows, file owners, ACLs and alternate data streams are not " "be correct. On Windows, file owners, ACLs and alternate data streams are not "
"copied." "copied."
msgstr "" msgstr ""
"Sur les plateformes POSIX, cela signifie que le propriétaire et le groupe du "
"fichier sont perdus, ainsi que les *ACLs*. Sur Mac OS, le clonage de "
"ressource et autres métadonnées ne sont pas utilisés. Cela signifie que les "
"ressources seront perdues et que le type de fichier et les codes créateur ne "
"seront pas corrects. Sur Windows, les propriétaires des fichiers, *ACLs* et "
"flux de données alternatifs ne sont pas copiés."
#: ../Doc/library/shutil.rst:37 #: ../Doc/library/shutil.rst:37
msgid "Directory and files operations" msgid "Directory and files operations"
msgstr "" msgstr "Opérations sur les répertoires et les fichiers"
#: ../Doc/library/shutil.rst:41 #: ../Doc/library/shutil.rst:41
msgid "" msgid ""
@ -61,6 +71,13 @@ msgid ""
"the *fsrc* object is not 0, only the contents from the current file position " "the *fsrc* object is not 0, only the contents from the current file position "
"to the end of the file will be copied." "to the end of the file will be copied."
msgstr "" msgstr ""
"Copie le contenu de l'objet fichier *fsrc* dans l'objet fichier *fdst*. "
"L'entier *length*, si spécifié, est la taille du tampon. En particulier, une "
"valeur de *length* négative signifie la copie des données sans découper la "
"source en morceaux ; par défaut les données sont lues par morceaux pour "
"éviter la consommation mémoire non-contrôlée. À noter que si la position "
"courante dans l'objet *fsrc* n'est pas 0, seul le contenu depuis la position "
"courante jusqu'à la fin est copié."
#: ../Doc/library/shutil.rst:52 #: ../Doc/library/shutil.rst:52
msgid "" msgid ""

View File

@ -124,7 +124,7 @@ msgstr "``'r'``"
#: ../Doc/library/sunau.rst:50 #: ../Doc/library/sunau.rst:50
msgid "Read only mode." msgid "Read only mode."
msgstr "" msgstr "Mode lecture seule."
#: ../Doc/library/sunau.rst:53 #: ../Doc/library/sunau.rst:53
msgid "``'w'``" msgid "``'w'``"
@ -132,7 +132,7 @@ msgstr "``'w'``"
#: ../Doc/library/sunau.rst:53 #: ../Doc/library/sunau.rst:53
msgid "Write only mode." msgid "Write only mode."
msgstr "" msgstr "Mode écriture seule."
#: ../Doc/library/sunau.rst:55 #: ../Doc/library/sunau.rst:55
msgid "Note that it does not allow read/write files." msgid "Note that it does not allow read/write files."
@ -146,7 +146,7 @@ msgstr ""
#: ../Doc/library/sunau.rst:63 #: ../Doc/library/sunau.rst:63
msgid "A synonym for :func:`.open`, maintained for backwards compatibility." msgid "A synonym for :func:`.open`, maintained for backwards compatibility."
msgstr "" msgstr "Un synonyme de :func:`.open`, maintenu pour la rétrocompatibilité."
#: ../Doc/library/sunau.rst:66 #: ../Doc/library/sunau.rst:66
msgid "The :mod:`sunau` module defines the following exception:" msgid "The :mod:`sunau` module defines the following exception:"
@ -202,15 +202,15 @@ msgstr ""
#: ../Doc/library/sunau.rst:125 #: ../Doc/library/sunau.rst:125
msgid "Returns sample width in bytes." msgid "Returns sample width in bytes."
msgstr "" msgstr "Renvoie la largeur de l'échantillon en octets."
#: ../Doc/library/sunau.rst:130 #: ../Doc/library/sunau.rst:130
msgid "Returns sampling frequency." msgid "Returns sampling frequency."
msgstr "" msgstr "Renvoie la fréquence d'échantillonnage."
#: ../Doc/library/sunau.rst:135 #: ../Doc/library/sunau.rst:135
msgid "Returns number of audio frames." msgid "Returns number of audio frames."
msgstr "" msgstr "Renvoie le nombre de trames audio."
#: ../Doc/library/sunau.rst:140 #: ../Doc/library/sunau.rst:140
msgid "" msgid ""
@ -240,13 +240,17 @@ msgstr ""
#: ../Doc/library/sunau.rst:166 #: ../Doc/library/sunau.rst:166
msgid "Rewind the file pointer to the beginning of the audio stream." msgid "Rewind the file pointer to the beginning of the audio stream."
msgstr "" msgstr "Remet le pointeur de fichier au début du flux audio."
#: ../Doc/library/sunau.rst:168 #: ../Doc/library/sunau.rst:168
msgid "" msgid ""
"The following two methods define a term \"position\" which is compatible " "The following two methods define a term \"position\" which is compatible "
"between them, and is otherwise implementation dependent." "between them, and is otherwise implementation dependent."
msgstr "" msgstr ""
"Les deux fonctions suivantes utilisent le vocabulaire \"position\". Ces "
"positions sont compatible entre elles, la \"position\" de l'un est "
"compatible avec la \"position\" de l'autre. Cette position est dépendante de "
"l'implémentation."
#: ../Doc/library/sunau.rst:174 #: ../Doc/library/sunau.rst:174
msgid "" msgid ""
@ -268,11 +272,11 @@ msgstr ""
#: ../Doc/library/sunau.rst:189 #: ../Doc/library/sunau.rst:189
msgid "Returns ``None``." msgid "Returns ``None``."
msgstr "" msgstr "Renvoie ``None``."
#: ../Doc/library/sunau.rst:194 #: ../Doc/library/sunau.rst:194
msgid "Raise an error." msgid "Raise an error."
msgstr "" msgstr "Lève une erreur."
#: ../Doc/library/sunau.rst:200 #: ../Doc/library/sunau.rst:200
msgid "AU_write Objects" msgid "AU_write Objects"
@ -286,7 +290,7 @@ msgstr ""
#: ../Doc/library/sunau.rst:207 #: ../Doc/library/sunau.rst:207
msgid "Set the number of channels." msgid "Set the number of channels."
msgstr "" msgstr "Définit le nombre de canaux."
#: ../Doc/library/sunau.rst:212 #: ../Doc/library/sunau.rst:212
msgid "Set the sample width (in bytes.)" msgid "Set the sample width (in bytes.)"
@ -323,7 +327,7 @@ msgstr ""
#: ../Doc/library/sunau.rst:247 #: ../Doc/library/sunau.rst:247
msgid "Write audio frames, without correcting *nframes*." msgid "Write audio frames, without correcting *nframes*."
msgstr "" msgstr "Écrit les trames audio sans corriger *nframes*."
#: ../Doc/library/sunau.rst:252 #: ../Doc/library/sunau.rst:252
msgid "Write audio frames and make sure *nframes* is correct." msgid "Write audio frames and make sure *nframes* is correct."

View File

@ -274,7 +274,7 @@ msgstr ""
#: ../Doc/library/sysconfig.rst:162 #: ../Doc/library/sysconfig.rst:162
msgid "Other functions" msgid "Other functions"
msgstr "" msgstr "Autres fonctions"
#: ../Doc/library/sysconfig.rst:166 #: ../Doc/library/sysconfig.rst:166
msgid "" msgid ""

View File

@ -37,6 +37,13 @@ msgid ""
"provided. The :mod:`threading` module provides an easier to use and higher-" "provided. The :mod:`threading` module provides an easier to use and higher-"
"level threading API built on top of this module." "level threading API built on top of this module."
msgstr "" msgstr ""
"Ce module fournit les primitives de bas niveau pour travailler avec de "
"multiples fils d'exécution (aussi appelés :dfn:`light-weight processes` ou :"
"dfn:`tasks`) — plusieurs fils d'exécution de contrôle partagent leur espace "
"de données global. Pour la synchronisation, de simples verrous (aussi "
"appelés des :dfn:`mutexes` ou des :dfn:`binary semaphores`) sont fournis. Le "
"module :mod:`threading` fournit une API de fils d'exécution de haut niveau, "
"plus facile à utiliser et construite à partir de ce module."
#: ../Doc/library/thread.rst:31 #: ../Doc/library/thread.rst:31
msgid "" msgid ""
@ -80,6 +87,8 @@ msgid ""
"Raise the :exc:`SystemExit` exception. When not caught, this will cause the " "Raise the :exc:`SystemExit` exception. When not caught, this will cause the "
"thread to exit silently." "thread to exit silently."
msgstr "" msgstr ""
"Lève une exception :exc:`SystemExit`. Quand elle n'est pas interceptée, le "
"fil d'exécution se terminera silencieusement."
#: ../Doc/library/thread.rst:84 #: ../Doc/library/thread.rst:84
msgid "" msgid ""
@ -143,18 +152,24 @@ msgid ""
"Releases the lock. The lock must have been acquired earlier, but not " "Releases the lock. The lock must have been acquired earlier, but not "
"necessarily by the same thread." "necessarily by the same thread."
msgstr "" msgstr ""
"Relâche le verrou. Le verrou doit avoir été acquis plus tôt, mais pas "
"nécessairement par le même fil d'exécution."
#: ../Doc/library/thread.rst:139 #: ../Doc/library/thread.rst:139
msgid "" msgid ""
"Return the status of the lock: ``True`` if it has been acquired by some " "Return the status of the lock: ``True`` if it has been acquired by some "
"thread, ``False`` if not." "thread, ``False`` if not."
msgstr "" msgstr ""
"Renvoie le statut du verrou : ``True`` s'il a été acquis par certains fils "
"d'exécution, sinon ``False``."
#: ../Doc/library/thread.rst:142 #: ../Doc/library/thread.rst:142
msgid "" msgid ""
"In addition to these methods, lock objects can also be used via the :keyword:" "In addition to these methods, lock objects can also be used via the :keyword:"
"`with` statement, e.g.::" "`with` statement, e.g.::"
msgstr "" msgstr ""
"En plus de ces méthodes, les objets verrous peuvent aussi être utilisés via "
"l'instruction :keyword:`with`, e.g. : ::"
#: ../Doc/library/thread.rst:152 #: ../Doc/library/thread.rst:152
msgid "**Caveats:**" msgid "**Caveats:**"
@ -166,6 +181,10 @@ msgid ""
"exception will be received by an arbitrary thread. (When the :mod:`signal` " "exception will be received by an arbitrary thread. (When the :mod:`signal` "
"module is available, interrupts always go to the main thread.)" "module is available, interrupts always go to the main thread.)"
msgstr "" msgstr ""
"Les fils d'exécution interagissent étrangement avec les interruptions : "
"l'exception :exc:`KeyboardInterrupt` sera reçue par un fil d'exécution "
"arbitraire. (Quand le module :mod:`signal` est disponible, les interruptions "
"vont toujours au fil d'exécution principal)."
#: ../Doc/library/thread.rst:160 #: ../Doc/library/thread.rst:160
msgid "" msgid ""
@ -179,6 +198,9 @@ msgid ""
"the :exc:`KeyboardInterrupt` exception will happen after the lock has been " "the :exc:`KeyboardInterrupt` exception will happen after the lock has been "
"acquired." "acquired."
msgstr "" msgstr ""
"Il n'est pas possible d'interrompre la méthode :meth:`acquire` sur un verrou "
"— l'exception :exc:`KeyboardInterrupt` surviendra après que le verrou a été "
"acquis."
#: ../Doc/library/thread.rst:168 #: ../Doc/library/thread.rst:168
msgid "" msgid ""
@ -194,3 +216,6 @@ msgid ""
"that :keyword:`try` ... :keyword:`finally` clauses are honored), and the " "that :keyword:`try` ... :keyword:`finally` clauses are honored), and the "
"standard I/O files are not flushed." "standard I/O files are not flushed."
msgstr "" msgstr ""
"Quand le fil d'exécution principal s'arrête, il ne fait pas son nettoyage "
"habituel (excepté que les clauses :keyword:`try`… :keyword:`finally` sont "
"honorées) et les fichiers d'entrée/sortie standards ne sont pas nettoyés."

View File

@ -18,7 +18,7 @@ msgstr ""
#: ../Doc/library/timeit.rst:2 #: ../Doc/library/timeit.rst:2
msgid ":mod:`timeit` --- Measure execution time of small code snippets" msgid ":mod:`timeit` --- Measure execution time of small code snippets"
msgstr "" msgstr ":mod:`timeit` — Mesurer le temps d'exécution de fragments de code"
#: ../Doc/library/timeit.rst:14 #: ../Doc/library/timeit.rst:14
msgid "**Source code:** :source:`Lib/timeit.py`" msgid "**Source code:** :source:`Lib/timeit.py`"
@ -32,20 +32,29 @@ msgid ""
"execution times. See also Tim Peters' introduction to the \"Algorithms\" " "execution times. See also Tim Peters' introduction to the \"Algorithms\" "
"chapter in the *Python Cookbook*, published by O'Reilly." "chapter in the *Python Cookbook*, published by O'Reilly."
msgstr "" msgstr ""
"Ce module fournit une façon simple de mesurer le temps d'exécution de "
"fragments de code Python. Il expose une :ref:`timeit-command-line-interface` "
"ainsi qu'une :ref:`interface Python <python-interface>`. Ce module permet "
"d'éviter un certain nombre de problèmes classiques liés à la mesure des "
"temps d'exécution. Voir par exemple à ce sujet l'introduction par Tim Peters "
"du chapitre « Algorithmes » dans le livre *Python Cookbook*, aux éditions "
"O'Reilly."
#: ../Doc/library/timeit.rst:26 #: ../Doc/library/timeit.rst:26
msgid "Basic Examples" msgid "Basic Examples"
msgstr "" msgstr "Exemples simples"
#: ../Doc/library/timeit.rst:28 #: ../Doc/library/timeit.rst:28
msgid "" msgid ""
"The following example shows how the :ref:`timeit-command-line-interface` can " "The following example shows how the :ref:`timeit-command-line-interface` can "
"be used to compare three different expressions:" "be used to compare three different expressions:"
msgstr "" msgstr ""
"L'exemple suivant illustre l'utilisation de l':ref:`timeit-command-line-"
"interface` afin de comparer trois expressions différentes :"
#: ../Doc/library/timeit.rst:40 #: ../Doc/library/timeit.rst:40
msgid "This can be achieved from the :ref:`python-interface` with::" msgid "This can be achieved from the :ref:`python-interface` with::"
msgstr "" msgstr "L':ref:`python-interface` peut être utilisée aux mêmes fins avec : ::"
#: ../Doc/library/timeit.rst:50 #: ../Doc/library/timeit.rst:50
msgid "" msgid ""
@ -56,11 +65,13 @@ msgstr ""
#: ../Doc/library/timeit.rst:58 #: ../Doc/library/timeit.rst:58
msgid "Python Interface" msgid "Python Interface"
msgstr "" msgstr "Interface Python"
#: ../Doc/library/timeit.rst:60 #: ../Doc/library/timeit.rst:60
msgid "The module defines three convenience functions and a public class:" msgid "The module defines three convenience functions and a public class:"
msgstr "" msgstr ""
"Ce module définit une classe publique ainsi que trois fonctions destinées à "
"simplifier son usage :"
#: ../Doc/library/timeit.rst:65 #: ../Doc/library/timeit.rst:65
msgid "" msgid ""
@ -89,6 +100,7 @@ msgstr ""
#: ../Doc/library/timeit.rst:93 #: ../Doc/library/timeit.rst:93
msgid "Class for timing execution speed of small code snippets." msgid "Class for timing execution speed of small code snippets."
msgstr "" msgstr ""
"Classe permettant de mesurer le temps d'exécution de fragments de code."
#: ../Doc/library/timeit.rst:95 #: ../Doc/library/timeit.rst:95
msgid "" msgid ""
@ -124,6 +136,13 @@ msgid ""
"statement, the setup statement and the timer function to be used are passed " "statement, the setup statement and the timer function to be used are passed "
"to the constructor." "to the constructor."
msgstr "" msgstr ""
"Mesure le temps *number* exécution de l'instruction principale. Ceci exécute "
"l'instruction de mise en place une seule fois puis renvoie un flottant "
"correspondant au temps nécessaire à l'exécution de l'instruction principale "
"à plusieurs reprises, mesuré en secondes. L'argument correspond au nombre "
"d'itérations dans la boucle, par défaut un million. L'instruction "
"principale, l'instruction de mise en place et la fonction de chronométrage "
"utilisée sont passées au constructeur."
#: ../Doc/library/timeit.rst:124 #: ../Doc/library/timeit.rst:124
msgid "" msgid ""
@ -137,7 +156,7 @@ msgstr ""
#: ../Doc/library/timeit.rst:136 #: ../Doc/library/timeit.rst:136
msgid "Call :meth:`.timeit` a few times." msgid "Call :meth:`.timeit` a few times."
msgstr "" msgstr "Appelle :meth:`.timeit` plusieurs fois."
#: ../Doc/library/timeit.rst:138 #: ../Doc/library/timeit.rst:138
msgid "" msgid ""
@ -146,6 +165,10 @@ msgid ""
"call :meth:`.timeit`. The second argument specifies the *number* argument " "call :meth:`.timeit`. The second argument specifies the *number* argument "
"for :meth:`.timeit`." "for :meth:`.timeit`."
msgstr "" msgstr ""
"Cette fonction d'agrément appelle :meth:`.timeit` à plusieurs reprises et "
"renvoie une liste de résultats. Le premier argument spécifie le nombre "
"d'appels à :meth:`.timeit`. Le second argument spécifie l'argument *number* "
"de :meth:`.timeit`."
#: ../Doc/library/timeit.rst:145 #: ../Doc/library/timeit.rst:145
msgid "" msgid ""
@ -158,6 +181,16 @@ msgid ""
"only number you should be interested in. After that, you should look at the " "only number you should be interested in. After that, you should look at the "
"entire vector and apply common sense rather than statistics." "entire vector and apply common sense rather than statistics."
msgstr "" msgstr ""
"Il est tentant de vouloir calculer la moyenne et l'écart-type des résultats "
"et notifier ces valeurs. Ce n'est cependant pas très utile. En pratique, la "
"valeur la plus basse donne une estimation basse de la vitesse maximale à "
"laquelle votre machine peut exécuter le fragment de code spécifié ; les "
"valeurs hautes de la liste sont typiquement provoquées non pas par une "
"variabilité de la vitesse d'exécution de Python, mais par d'autres processus "
"interférant avec la précision du chronométrage. Le :func:`min` du résultat "
"est probablement la seule valeur à laquelle vous devriez vous intéresser. "
"Pour aller plus loin, vous devriez regarder l'intégralité des résultats et "
"utiliser le bon sens plutôt que les statistiques."
#: ../Doc/library/timeit.rst:158 #: ../Doc/library/timeit.rst:158
msgid "Helper to print a traceback from the timed code." msgid "Helper to print a traceback from the timed code."
@ -165,7 +198,7 @@ msgstr ""
#: ../Doc/library/timeit.rst:160 #: ../Doc/library/timeit.rst:160
msgid "Typical use::" msgid "Typical use::"
msgstr "" msgstr "Usage typique : ::"
#: ../Doc/library/timeit.rst:168 #: ../Doc/library/timeit.rst:168
msgid "" msgid ""
@ -182,14 +215,16 @@ msgstr "Interface en ligne de commande"
msgid "" msgid ""
"When called as a program from the command line, the following form is used::" "When called as a program from the command line, the following form is used::"
msgstr "" msgstr ""
"Lorsque le module est appelé comme un programme en ligne de commande, la "
"syntaxe suivante est utilisée : ::"
#: ../Doc/library/timeit.rst:182 #: ../Doc/library/timeit.rst:182
msgid "Where the following options are understood:" msgid "Where the following options are understood:"
msgstr "" msgstr "Les options suivantes sont gérées :"
#: ../Doc/library/timeit.rst:188 #: ../Doc/library/timeit.rst:188
msgid "how many times to execute 'statement'" msgid "how many times to execute 'statement'"
msgstr "" msgstr "nombre d'exécutions de l'instruction *statement*"
#: ../Doc/library/timeit.rst:192 #: ../Doc/library/timeit.rst:192
msgid "how many times to repeat the timer (default 3)" msgid "how many times to repeat the timer (default 3)"
@ -198,6 +233,7 @@ msgstr ""
#: ../Doc/library/timeit.rst:196 #: ../Doc/library/timeit.rst:196
msgid "statement to be executed once initially (default ``pass``)" msgid "statement to be executed once initially (default ``pass``)"
msgstr "" msgstr ""
"instruction exécutée une seule fois à l'initialisation (``pass`` par défaut)"
#: ../Doc/library/timeit.rst:200 #: ../Doc/library/timeit.rst:200
msgid "use :func:`time.time` (default on all platforms but Windows)" msgid "use :func:`time.time` (default on all platforms but Windows)"
@ -213,7 +249,7 @@ msgstr ""
#: ../Doc/library/timeit.rst:212 #: ../Doc/library/timeit.rst:212
msgid "print a short usage message and exit" msgid "print a short usage message and exit"
msgstr "" msgstr "affiche un court message d'aide puis quitte"
#: ../Doc/library/timeit.rst:214 #: ../Doc/library/timeit.rst:214
msgid "" msgid ""
@ -222,12 +258,19 @@ msgid ""
"quotes and using leading spaces. Multiple :option:`-s` options are treated " "quotes and using leading spaces. Multiple :option:`-s` options are treated "
"similarly." "similarly."
msgstr "" msgstr ""
"Une instruction sur plusieurs lignes peut être donnée en entrée en "
"spécifiant chaque ligne comme un argument séparé. Indenter une ligne est "
"possible en encadrant l'argument de guillemets et en le préfixant par des "
"espaces. Plusieurs :option:`-s` sont gérées de la même façon."
#: ../Doc/library/timeit.rst:219 #: ../Doc/library/timeit.rst:219
msgid "" msgid ""
"If :option:`-n` is not given, a suitable number of loops is calculated by " "If :option:`-n` is not given, a suitable number of loops is calculated by "
"trying successive powers of 10 until the total time is at least 0.2 seconds." "trying successive powers of 10 until the total time is at least 0.2 seconds."
msgstr "" msgstr ""
"Si :option:`-n` n'est pas donnée, le nombre de boucles adapté est déterminé "
"automatiquement en essayant les puissances de 10 successives jusqu'à ce que "
"le temps total d'exécution dépasse 0,2 secondes."
#: ../Doc/library/timeit.rst:222 #: ../Doc/library/timeit.rst:222
msgid "" msgid ""
@ -259,10 +302,14 @@ msgid ""
"It is possible to provide a setup statement that is executed only once at " "It is possible to provide a setup statement that is executed only once at "
"the beginning:" "the beginning:"
msgstr "" msgstr ""
"Il est possible de fournir une instruction de mise en place exécutée une "
"seule fois au début du chronométrage :"
#: ../Doc/library/timeit.rst:261 #: ../Doc/library/timeit.rst:261
msgid "The same can be done using the :class:`Timer` class and its methods::" msgid "The same can be done using the :class:`Timer` class and its methods::"
msgstr "" msgstr ""
"La même chose peut être réalisée en utilisant la classe :class:`Timer` et "
"ses méthodes : ::"
#: ../Doc/library/timeit.rst:271 #: ../Doc/library/timeit.rst:271
msgid "" msgid ""
@ -270,9 +317,16 @@ msgid ""
"lines. Here we compare the cost of using :func:`hasattr` vs. :keyword:`try`/:" "lines. Here we compare the cost of using :func:`hasattr` vs. :keyword:`try`/:"
"keyword:`except` to test for missing and present object attributes:" "keyword:`except` to test for missing and present object attributes:"
msgstr "" msgstr ""
"Les exemples qui suivent montrent comment chronométrer des expressions sur "
"plusieurs lignes. Nous comparons ici le coût d'utilisation de :func:"
"`hasattr` par rapport à :keyword:`try`/:keyword:`except` pour tester la "
"présence ou l'absence d'attributs d'un objet :"
#: ../Doc/library/timeit.rst:316 #: ../Doc/library/timeit.rst:316
msgid "" msgid ""
"To give the :mod:`timeit` module access to functions you define, you can " "To give the :mod:`timeit` module access to functions you define, you can "
"pass a *setup* parameter which contains an import statement::" "pass a *setup* parameter which contains an import statement::"
msgstr "" msgstr ""
"Afin de permettre à :mod:`timeit` d'accéder aux fonctions que vous avez "
"définies, vous pouvez passer au paramètre *setup* une instruction "
"d'importation: ::"

File diff suppressed because it is too large Load Diff

View File

@ -166,7 +166,7 @@ msgstr ""
#: ../Doc/library/ttk.rst:116 #: ../Doc/library/ttk.rst:116
msgid "cursor" msgid "cursor"
msgstr "" msgstr "*cursor*"
#: ../Doc/library/ttk.rst:116 #: ../Doc/library/ttk.rst:116
msgid "" msgid ""
@ -544,7 +544,7 @@ msgstr ""
#: ../Doc/library/ttk.rst:313 #: ../Doc/library/ttk.rst:313
msgid "justify" msgid "justify"
msgstr "" msgstr "*justify*"
#: ../Doc/library/ttk.rst:313 #: ../Doc/library/ttk.rst:313
msgid "" msgid ""
@ -1257,7 +1257,7 @@ msgstr ""
#: ../Doc/library/ttk.rst:792 #: ../Doc/library/ttk.rst:792
msgid "font" msgid "font"
msgstr "" msgstr "*font*"
#: ../Doc/library/ttk.rst:792 #: ../Doc/library/ttk.rst:792
msgid "Specifies the font to use when drawing text." msgid "Specifies the font to use when drawing text."
@ -1561,7 +1561,7 @@ msgstr ""
#: ../Doc/library/ttk.rst:978 #: ../Doc/library/ttk.rst:978
msgid "region" msgid "region"
msgstr "" msgstr "*region*"
#: ../Doc/library/ttk.rst:978 #: ../Doc/library/ttk.rst:978
msgid "meaning" msgid "meaning"

View File

@ -18,7 +18,7 @@ msgstr ""
#: ../Doc/library/wave.rst:2 #: ../Doc/library/wave.rst:2
msgid ":mod:`wave` --- Read and write WAV files" msgid ":mod:`wave` --- Read and write WAV files"
msgstr "" msgstr ":mod:`wave` --- Lecture et écriture des fichiers WAV"
#: ../Doc/library/wave.rst:9 #: ../Doc/library/wave.rst:9
msgid "**Source code:** :source:`Lib/wave.py`" msgid "**Source code:** :source:`Lib/wave.py`"
@ -30,10 +30,13 @@ msgid ""
"format. It does not support compression/decompression, but it does support " "format. It does not support compression/decompression, but it does support "
"mono/stereo." "mono/stereo."
msgstr "" msgstr ""
"Le module :mod:`wave` fournit une interface pratique pour le format de son "
"WAV. Il ne gère pas la compression ni la décompression, mais gère le mono et "
"le stéréo."
#: ../Doc/library/wave.rst:16 #: ../Doc/library/wave.rst:16
msgid "The :mod:`wave` module defines the following function and exception:" msgid "The :mod:`wave` module defines the following function and exception:"
msgstr "" msgstr "Le module :mod:`wave` définit la fonction et l'exception suivante :"
#: ../Doc/library/wave.rst:21 #: ../Doc/library/wave.rst:21
msgid "" msgid ""
@ -47,7 +50,7 @@ msgstr ""
#: ../Doc/library/wave.rst:25 #: ../Doc/library/wave.rst:25
msgid "Read only mode." msgid "Read only mode."
msgstr "" msgstr "Mode lecture seule."
#: ../Doc/library/wave.rst:28 #: ../Doc/library/wave.rst:28
msgid "``'w'``, ``'wb'``" msgid "``'w'``, ``'wb'``"
@ -55,11 +58,13 @@ msgstr ""
#: ../Doc/library/wave.rst:28 #: ../Doc/library/wave.rst:28
msgid "Write only mode." msgid "Write only mode."
msgstr "" msgstr "Mode écriture seule."
#: ../Doc/library/wave.rst:30 #: ../Doc/library/wave.rst:30
msgid "Note that it does not allow read/write WAV files." msgid "Note that it does not allow read/write WAV files."
msgstr "" msgstr ""
"Notez que ce module ne permet pas de manipuler des fichiers WAV en lecture/"
"écriture."
#: ../Doc/library/wave.rst:32 #: ../Doc/library/wave.rst:32
msgid "" msgid ""
@ -76,57 +81,69 @@ msgid ""
"its :meth:`close` method is called; it is the caller's responsibility to " "its :meth:`close` method is called; it is the caller's responsibility to "
"close the file object." "close the file object."
msgstr "" msgstr ""
"Si vous donnez un objet de type fichier, l'objet *wave* ne le ferme pas "
"lorsque sa méthode :meth:`close` est appelée car c'est l'appelant qui est "
"responsable de la fermeture."
#: ../Doc/library/wave.rst:45 #: ../Doc/library/wave.rst:45
msgid "A synonym for :func:`.open`, maintained for backwards compatibility." msgid "A synonym for :func:`.open`, maintained for backwards compatibility."
msgstr "" msgstr "Un synonyme de :func:`.open`, maintenu pour la rétrocompatibilité."
#: ../Doc/library/wave.rst:50 #: ../Doc/library/wave.rst:50
msgid "" msgid ""
"An error raised when something is impossible because it violates the WAV " "An error raised when something is impossible because it violates the WAV "
"specification or hits an implementation deficiency." "specification or hits an implementation deficiency."
msgstr "" msgstr ""
"Une erreur est levée lorsque quelque chose est impossible car elle enfreint "
"la spécification WAV ou rencontre un problème d'implémentation."
#: ../Doc/library/wave.rst:57 #: ../Doc/library/wave.rst:57
msgid "Wave_read Objects" msgid "Wave_read Objects"
msgstr "" msgstr "Objets Wave_read"
#: ../Doc/library/wave.rst:59 #: ../Doc/library/wave.rst:59
msgid "" msgid ""
"Wave_read objects, as returned by :func:`.open`, have the following methods:" "Wave_read objects, as returned by :func:`.open`, have the following methods:"
msgstr "" msgstr ""
"Les objets Wave_read, tels qu'ils sont renvoyés par :func:`.open`, ont les "
"méthodes suivantes :"
#: ../Doc/library/wave.rst:64 #: ../Doc/library/wave.rst:64
msgid "" msgid ""
"Close the stream if it was opened by :mod:`wave`, and make the instance " "Close the stream if it was opened by :mod:`wave`, and make the instance "
"unusable. This is called automatically on object collection." "unusable. This is called automatically on object collection."
msgstr "" msgstr ""
"Ferme le flux s'il a été ouvert par :mod:`wave` et rend l'instance "
"inutilisable. Ceci est appelé automatiquement lorsque l'objet est détruit ."
#: ../Doc/library/wave.rst:70 #: ../Doc/library/wave.rst:70
msgid "Returns number of audio channels (``1`` for mono, ``2`` for stereo)." msgid "Returns number of audio channels (``1`` for mono, ``2`` for stereo)."
msgstr "" msgstr ""
"Renvoie le nombre de canaux audio (``1`` pour mono, ``2`` pour stéréo)."
#: ../Doc/library/wave.rst:75 #: ../Doc/library/wave.rst:75
msgid "Returns sample width in bytes." msgid "Returns sample width in bytes."
msgstr "" msgstr "Renvoie la largeur de l'échantillon en octets."
#: ../Doc/library/wave.rst:80 #: ../Doc/library/wave.rst:80
msgid "Returns sampling frequency." msgid "Returns sampling frequency."
msgstr "" msgstr "Renvoie la fréquence d'échantillonnage."
#: ../Doc/library/wave.rst:85 #: ../Doc/library/wave.rst:85
msgid "Returns number of audio frames." msgid "Returns number of audio frames."
msgstr "" msgstr "Renvoie le nombre de trames audio."
#: ../Doc/library/wave.rst:90 #: ../Doc/library/wave.rst:90
msgid "Returns compression type (``'NONE'`` is the only supported type)." msgid "Returns compression type (``'NONE'`` is the only supported type)."
msgstr "" msgstr "Renvoie le type de compression (``'NONE'`` est le seul type géré)."
#: ../Doc/library/wave.rst:95 #: ../Doc/library/wave.rst:95
msgid "" msgid ""
"Human-readable version of :meth:`getcomptype`. Usually ``'not compressed'`` " "Human-readable version of :meth:`getcomptype`. Usually ``'not compressed'`` "
"parallels ``'NONE'``." "parallels ``'NONE'``."
msgstr "" msgstr ""
"Version compréhensible de :meth:`getcomptype`. Généralement, ``'not "
"compressed'`` équivaut à ``'NONE'``."
#: ../Doc/library/wave.rst:101 #: ../Doc/library/wave.rst:101
msgid "" msgid ""
@ -140,44 +157,52 @@ msgstr ""
#: ../Doc/library/wave.rst:112 #: ../Doc/library/wave.rst:112
msgid "Rewind the file pointer to the beginning of the audio stream." msgid "Rewind the file pointer to the beginning of the audio stream."
msgstr "" msgstr "Remet le pointeur de fichier au début du flux audio."
#: ../Doc/library/wave.rst:114 #: ../Doc/library/wave.rst:114
msgid "" msgid ""
"The following two methods are defined for compatibility with the :mod:`aifc` " "The following two methods are defined for compatibility with the :mod:`aifc` "
"module, and don't do anything interesting." "module, and don't do anything interesting."
msgstr "" msgstr ""
"Les deux méthodes suivantes sont définies pour la compatibilité avec le "
"module :mod:`aifc` ; elles ne font rien dintéressant."
#: ../Doc/library/wave.rst:120 #: ../Doc/library/wave.rst:120
msgid "Returns ``None``." msgid "Returns ``None``."
msgstr "" msgstr "Renvoie ``None``."
#: ../Doc/library/wave.rst:125 #: ../Doc/library/wave.rst:125
msgid "Raise an error." msgid "Raise an error."
msgstr "" msgstr "Lève une erreur."
#: ../Doc/library/wave.rst:127 #: ../Doc/library/wave.rst:127
msgid "" msgid ""
"The following two methods define a term \"position\" which is compatible " "The following two methods define a term \"position\" which is compatible "
"between them, and is otherwise implementation dependent." "between them, and is otherwise implementation dependent."
msgstr "" msgstr ""
"Les deux fonctions suivantes utilisent le vocabulaire \"position\". Ces "
"positions sont compatible entre elles, la \"position\" de l'un est "
"compatible avec la \"position\" de l'autre. Cette position est dépendante de "
"l'implémentation."
#: ../Doc/library/wave.rst:133 #: ../Doc/library/wave.rst:133
msgid "Set the file pointer to the specified position." msgid "Set the file pointer to the specified position."
msgstr "" msgstr "Place le pointeur du fichier sur la position spécifiée."
#: ../Doc/library/wave.rst:138 #: ../Doc/library/wave.rst:138
msgid "Return current file pointer position." msgid "Return current file pointer position."
msgstr "" msgstr "Renvoie la position actuelle du pointeur du fichier."
#: ../Doc/library/wave.rst:144 #: ../Doc/library/wave.rst:144
msgid "Wave_write Objects" msgid "Wave_write Objects"
msgstr "" msgstr "Objets Wave_write"
#: ../Doc/library/wave.rst:146 #: ../Doc/library/wave.rst:146
msgid "" msgid ""
"Wave_write objects, as returned by :func:`.open`, have the following methods:" "Wave_write objects, as returned by :func:`.open`, have the following methods:"
msgstr "" msgstr ""
"Les objets Wave_write, tels qu'ils sont renvoyés par :func:`.open`, ont les "
"méthodes suivantes :"
#: ../Doc/library/wave.rst:151 #: ../Doc/library/wave.rst:151
msgid "" msgid ""
@ -187,15 +212,15 @@ msgstr ""
#: ../Doc/library/wave.rst:157 #: ../Doc/library/wave.rst:157
msgid "Set the number of channels." msgid "Set the number of channels."
msgstr "" msgstr "Définit le nombre de canaux."
#: ../Doc/library/wave.rst:162 #: ../Doc/library/wave.rst:162
msgid "Set the sample width to *n* bytes." msgid "Set the sample width to *n* bytes."
msgstr "" msgstr "Définit la largeur de l'échantillon à *n* octets."
#: ../Doc/library/wave.rst:167 #: ../Doc/library/wave.rst:167
msgid "Set the frame rate to *n*." msgid "Set the frame rate to *n*."
msgstr "" msgstr "Définit la fréquence des trames à *n*."
#: ../Doc/library/wave.rst:172 #: ../Doc/library/wave.rst:172
msgid "" msgid ""
@ -208,6 +233,8 @@ msgid ""
"Set the compression type and description. At the moment, only compression " "Set the compression type and description. At the moment, only compression "
"type ``NONE`` is supported, meaning no compression." "type ``NONE`` is supported, meaning no compression."
msgstr "" msgstr ""
"Définit le type de compression et la description. Pour le moment, seul le "
"type de compression ``NONE`` est géré, c'est-à-dire aucune compression."
#: ../Doc/library/wave.rst:184 #: ../Doc/library/wave.rst:184
msgid "" msgid ""
@ -215,16 +242,21 @@ msgid ""
"compname)``, with values valid for the :meth:`set\\*` methods. Sets all " "compname)``, with values valid for the :meth:`set\\*` methods. Sets all "
"parameters." "parameters."
msgstr "" msgstr ""
"Le *tuple* doit être ``(nchannels, sampwidth, framerate, nframes, comptype, "
"compname)``, avec des valeurs valides pour les méthodes :meth:`set\\*`. Tous "
"les paramètres sont obligatoires et doivent être définis."
#: ../Doc/library/wave.rst:191 #: ../Doc/library/wave.rst:191
msgid "" msgid ""
"Return current position in the file, with the same disclaimer for the :meth:" "Return current position in the file, with the same disclaimer for the :meth:"
"`Wave_read.tell` and :meth:`Wave_read.setpos` methods." "`Wave_read.tell` and :meth:`Wave_read.setpos` methods."
msgstr "" msgstr ""
"Renvoie la position actuelle dans le fichier, avec les mêmes réserves que "
"pour les méthodes :meth:`Wave_read.tell` et :meth:`Wave_read.setpos`."
#: ../Doc/library/wave.rst:197 #: ../Doc/library/wave.rst:197
msgid "Write audio frames, without correcting *nframes*." msgid "Write audio frames, without correcting *nframes*."
msgstr "" msgstr "Écrit les trames audio sans corriger *nframes*."
#: ../Doc/library/wave.rst:202 #: ../Doc/library/wave.rst:202
msgid "Write audio frames and make sure *nframes* is correct." msgid "Write audio frames and make sure *nframes* is correct."
@ -236,3 +268,6 @@ msgid ""
"`writeframes` or :meth:`writeframesraw`, and any attempt to do so will " "`writeframes` or :meth:`writeframesraw`, and any attempt to do so will "
"raise :exc:`wave.Error`." "raise :exc:`wave.Error`."
msgstr "" msgstr ""
"Notez qu'il est impossible de définir des paramètres après avoir appelé :"
"meth:`writeframes` ou :meth:`writeframesraw`, et toute tentative en ce sens "
"lève une :exc:`wave.Error`."

View File

@ -18,7 +18,7 @@ msgstr ""
#: ../Doc/library/zipimport.rst:3 #: ../Doc/library/zipimport.rst:3
msgid ":mod:`zipimport` --- Import modules from Zip archives" msgid ":mod:`zipimport` --- Import modules from Zip archives"
msgstr "" msgstr ":mod:`zipimport` — Importer des modules à partir d'archives Zip"
#: ../Doc/library/zipimport.rst:12 #: ../Doc/library/zipimport.rst:12
msgid "" msgid ""
@ -39,6 +39,14 @@ msgid ""
"lib/` would only import from the :file:`lib/` subdirectory within the " "lib/` would only import from the :file:`lib/` subdirectory within the "
"archive." "archive."
msgstr "" msgstr ""
"Typiquement, :data:`sys.path` est une liste de noms de répertoires sous "
"forme de chaînes. Ce module permet également à un élément de :data:`sys."
"path` d'être une chaîne nommant une archive de fichier ZIP. L'archive ZIP "
"peut contenir une structure de sous-répertoire pour prendre en charge les "
"importations de paquets, et un chemin dans l'archive peut être spécifié pour "
"importer uniquement à partir d'un sous-répertoire. Par exemple, le chemin "
"d'accès :file:`example.zip/lib/` importerait uniquement depuis le sous-"
"répertoire :file:`lib/` dans l'archive."
#: ../Doc/library/zipimport.rst:25 #: ../Doc/library/zipimport.rst:25
msgid "" msgid ""
@ -67,6 +75,8 @@ msgid ""
"`PKZIP Application Note <https://pkware.cachefly.net/webdocs/casestudies/" "`PKZIP Application Note <https://pkware.cachefly.net/webdocs/casestudies/"
"APPNOTE.TXT>`_" "APPNOTE.TXT>`_"
msgstr "" msgstr ""
"`PKZIP Application Note <https://pkware.cachefly.net/webdocs/casestudies/"
"APPNOTE.TXT>`_"
#: ../Doc/library/zipimport.rst:41 #: ../Doc/library/zipimport.rst:41
msgid "" msgid ""
@ -78,7 +88,7 @@ msgstr ""
#: ../Doc/library/zipimport.rst:47 #: ../Doc/library/zipimport.rst:47
msgid ":pep:`273` - Import Modules from Zip Archives" msgid ":pep:`273` - Import Modules from Zip Archives"
msgstr "" msgstr ":pep:`273` - Import Modules from Zip Archives"
#: ../Doc/library/zipimport.rst:45 #: ../Doc/library/zipimport.rst:45
msgid "" msgid ""
@ -89,29 +99,33 @@ msgstr ""
#: ../Doc/library/zipimport.rst:49 #: ../Doc/library/zipimport.rst:49
msgid ":pep:`302` - New Import Hooks" msgid ":pep:`302` - New Import Hooks"
msgstr "" msgstr ":pep:`302` — Nouveaux crochets d'importation"
#: ../Doc/library/zipimport.rst:50 #: ../Doc/library/zipimport.rst:50
msgid "The PEP to add the import hooks that help this module work." msgid "The PEP to add the import hooks that help this module work."
msgstr "" msgstr ""
"Le PEP pour ajouter les crochets d'importation qui aident ce module à "
"fonctionner."
#: ../Doc/library/zipimport.rst:53 #: ../Doc/library/zipimport.rst:53
msgid "This module defines an exception:" msgid "This module defines an exception:"
msgstr "" msgstr "Ce module définit une exception :"
#: ../Doc/library/zipimport.rst:57 #: ../Doc/library/zipimport.rst:57
msgid "" msgid ""
"Exception raised by zipimporter objects. It's a subclass of :exc:" "Exception raised by zipimporter objects. It's a subclass of :exc:"
"`ImportError`, so it can be caught as :exc:`ImportError`, too." "`ImportError`, so it can be caught as :exc:`ImportError`, too."
msgstr "" msgstr ""
"Exception levée par les objets *zipimporter*. C'est une sous-classe de :exc:"
"`ImportError`, donc il peut être pris comme :exc:`ImportError`, aussi."
#: ../Doc/library/zipimport.rst:64 #: ../Doc/library/zipimport.rst:64
msgid "zipimporter Objects" msgid "zipimporter Objects"
msgstr "" msgstr "Objets *zimporter*"
#: ../Doc/library/zipimport.rst:66 #: ../Doc/library/zipimport.rst:66
msgid ":class:`zipimporter` is the class for importing ZIP files." msgid ":class:`zipimporter` is the class for importing ZIP files."
msgstr "" msgstr ":class:`zipimporter` est la classe pour importer des fichiers ZIP."
#: ../Doc/library/zipimport.rst:70 #: ../Doc/library/zipimport.rst:70
msgid "" msgid ""
@ -121,12 +135,19 @@ msgid ""
"`lib` directory inside the ZIP file :file:`foo/bar.zip` (provided that it " "`lib` directory inside the ZIP file :file:`foo/bar.zip` (provided that it "
"exists)." "exists)."
msgstr "" msgstr ""
"Créez une nouvelle instance de `zipimporter`. *archivepath* doit être un "
"chemin vers un fichier ZIP, ou vers un chemin spécifique dans un fichier "
"ZIP. Par exemple, un *archivepath* de :file:`foo/bar.zip/lib` cherchera les "
"modules dans le répertoire :file:`lib` du fichier ZIP :file:`foo/bar.zip` "
"(si celui-ci existe)."
#: ../Doc/library/zipimport.rst:75 #: ../Doc/library/zipimport.rst:75
msgid "" msgid ""
":exc:`ZipImportError` is raised if *archivepath* doesn't point to a valid " ":exc:`ZipImportError` is raised if *archivepath* doesn't point to a valid "
"ZIP archive." "ZIP archive."
msgstr "" msgstr ""
":exc:`ZipImportError` est levée si *archivepath* ne pointe pas vers une "
"archive ZIP valide."
#: ../Doc/library/zipimport.rst:80 #: ../Doc/library/zipimport.rst:80
msgid "" msgid ""
@ -136,12 +157,19 @@ msgid ""
"argument is ignored---it's there for compatibility with the importer " "argument is ignored---it's there for compatibility with the importer "
"protocol." "protocol."
msgstr "" msgstr ""
"Rechercher un module spécifié par *fullname*. *fullname* doit être le nom du "
"module entièrement qualifié (`dotted`). Elle retourne l'instance "
"`zipimporter` elle-même si le module a été trouvé, ou :const:`None` si ce "
"n'est pas le cas. L'argument optionnel *path* est ignoré --- il est là pour "
"la compatibilité avec le protocole de l'importateur."
#: ../Doc/library/zipimport.rst:89 #: ../Doc/library/zipimport.rst:89
msgid "" msgid ""
"Return the code object for the specified module. Raise :exc:`ZipImportError` " "Return the code object for the specified module. Raise :exc:`ZipImportError` "
"if the module couldn't be found." "if the module couldn't be found."
msgstr "" msgstr ""
"Retourne l'objet de code pour le module spécifié. Lève :exc:`ZipImportError` "
"si le module n'a pas pu être trouvé."
#: ../Doc/library/zipimport.rst:95 #: ../Doc/library/zipimport.rst:95
msgid "" msgid ""
@ -154,6 +182,9 @@ msgid ""
"Return the value ``__file__`` would be set to if the specified module was " "Return the value ``__file__`` would be set to if the specified module was "
"imported. Raise :exc:`ZipImportError` if the module couldn't be found." "imported. Raise :exc:`ZipImportError` if the module couldn't be found."
msgstr "" msgstr ""
"Renvoie la valeur ``__file____`` qui serait définie si le module spécifié "
"était importé. Lève :exc:`ZipImportError` si le module n'a pas pu être "
"trouvé."
#: ../Doc/library/zipimport.rst:110 #: ../Doc/library/zipimport.rst:110
msgid "" msgid ""
@ -161,12 +192,17 @@ msgid ""
"if the module couldn't be found, return :const:`None` if the archive does " "if the module couldn't be found, return :const:`None` if the archive does "
"contain the module, but has no source for it." "contain the module, but has no source for it."
msgstr "" msgstr ""
"Renvoie le code source du module spécifié. Lève :exc:`ZipImportError` si le "
"module n'a pas pu être trouvé, renvoie :const:`None` si l'archive contient "
"le module, mais n'en a pas la source."
#: ../Doc/library/zipimport.rst:118 #: ../Doc/library/zipimport.rst:118
msgid "" msgid ""
"Return ``True`` if the module specified by *fullname* is a package. Raise :" "Return ``True`` if the module specified by *fullname* is a package. Raise :"
"exc:`ZipImportError` if the module couldn't be found." "exc:`ZipImportError` if the module couldn't be found."
msgstr "" msgstr ""
"Renvoie ``True`` si le module spécifié par *fullname* est un paquet. Lève :"
"exc:`ZipImportError` si le module n'a pas pu être trouvé."
#: ../Doc/library/zipimport.rst:124 #: ../Doc/library/zipimport.rst:124
msgid "" msgid ""
@ -174,18 +210,26 @@ msgid ""
"qualified (dotted) module name. It returns the imported module, or raises :" "qualified (dotted) module name. It returns the imported module, or raises :"
"exc:`ZipImportError` if it wasn't found." "exc:`ZipImportError` if it wasn't found."
msgstr "" msgstr ""
"Charge le module spécifié par *fullname*. *fullname* doit être le nom du "
"module entièrement qualifié (`dotted`). Il renvoie le module importé, ou "
"augmente :exc:`ZipImportError` s'il n'a pas été trouvé."
#: ../Doc/library/zipimport.rst:131 #: ../Doc/library/zipimport.rst:131
msgid "" msgid ""
"The file name of the importer's associated ZIP file, without a possible " "The file name of the importer's associated ZIP file, without a possible "
"subpath." "subpath."
msgstr "" msgstr ""
"Le nom de fichier de l'archive ZIP associé à l'importateur, sans sous-chemin "
"possible."
#: ../Doc/library/zipimport.rst:137 #: ../Doc/library/zipimport.rst:137
msgid "" msgid ""
"The subpath within the ZIP file where modules are searched. This is the " "The subpath within the ZIP file where modules are searched. This is the "
"empty string for zipimporter objects which point to the root of the ZIP file." "empty string for zipimporter objects which point to the root of the ZIP file."
msgstr "" msgstr ""
"Le sous-chemin du fichier ZIP où les modules sont recherchés. C'est la "
"chaîne vide pour les objets `zipimporter` qui pointent vers la racine du "
"fichier ZIP."
#: ../Doc/library/zipimport.rst:141 #: ../Doc/library/zipimport.rst:141
msgid "" msgid ""
@ -193,6 +237,9 @@ msgid ""
"slash, equal the original *archivepath* argument given to the :class:" "slash, equal the original *archivepath* argument given to the :class:"
"`zipimporter` constructor." "`zipimporter` constructor."
msgstr "" msgstr ""
"Les attributs :attr:`archive` et :attr:`prefix`, lorsqu'ils sont combinés "
"avec une barre oblique, égalent l'argument original *archivepath* donné au "
"constructeur :class:`zipimporter`."
#: ../Doc/library/zipimport.rst:149 #: ../Doc/library/zipimport.rst:149
msgid "Examples" msgid "Examples"
@ -203,3 +250,5 @@ msgid ""
"Here is an example that imports a module from a ZIP archive - note that the :" "Here is an example that imports a module from a ZIP archive - note that the :"
"mod:`zipimport` module is not explicitly used." "mod:`zipimport` module is not explicitly used."
msgstr "" msgstr ""
"Voici un exemple qui importe un module d'une archive ZIP — notez que le "
"module :mod:`zipimport` n'est pas explicitement utilisé."

View File

@ -324,7 +324,7 @@ msgstr ""
#: ../Doc/whatsnew/2.3.rst:331 #: ../Doc/whatsnew/2.3.rst:331
msgid ":pep:`273` - Import Modules from Zip Archives" msgid ":pep:`273` - Import Modules from Zip Archives"
msgstr "" msgstr ":pep:`273` - Import Modules from Zip Archives"
#: ../Doc/whatsnew/2.3.rst:329 #: ../Doc/whatsnew/2.3.rst:329
msgid "" msgid ""
@ -784,7 +784,7 @@ msgstr ""
#: ../Doc/whatsnew/2.3.rst:760 #: ../Doc/whatsnew/2.3.rst:760
msgid ":pep:`302` - New Import Hooks" msgid ":pep:`302` - New Import Hooks"
msgstr "" msgstr ":pep:`302` — Nouveaux crochets d'importation"
#: ../Doc/whatsnew/2.3.rst:761 #: ../Doc/whatsnew/2.3.rst:761
msgid "" msgid ""

View File

@ -592,6 +592,9 @@ msgid ""
"The cumulative effect of these changes is to turn generators from one-way " "The cumulative effect of these changes is to turn generators from one-way "
"producers of information into both producers and consumers." "producers of information into both producers and consumers."
msgstr "" msgstr ""
"Ces changements cumulés transforment les générateurs de producteurs "
"unidirectionnels d'information vers un statut hybride à la fois producteur "
"et consommateur."
#: ../Doc/whatsnew/2.5.rst:517 #: ../Doc/whatsnew/2.5.rst:517
msgid "" msgid ""