From 12d0f202b8d9504f9289b711e9382ce1541611e4 Mon Sep 17 00:00:00 2001 From: awecx Date: Sun, 31 Oct 2021 16:39:48 +0100 Subject: [PATCH 1/7] Premier jet --- library/ctypes.po | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/library/ctypes.po b/library/ctypes.po index 211d57bc9..f315bb420 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-09-23 16:16+0200\n" -"PO-Revision-Date: 2020-08-17 23:01+0200\n" +"PO-Revision-Date: 2021-10-30 16:56+0200\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -36,15 +36,14 @@ msgid "ctypes tutorial" msgstr "Didacticiel de *ctypes*" #: library/ctypes.rst:21 -#, fuzzy msgid "" "Note: The code samples in this tutorial use :mod:`doctest` to make sure that " "they actually work. Since some code samples behave differently under Linux, " "Windows, or macOS, they contain doctest directives in comments." msgstr "" -"Remarque : Les exemples de code de ce didacticiel utilisent :mod:`doctest` " +"Remarque : les exemples de code de ce didacticiel utilisent :mod:`doctest` " "pour s'assurer de leur propre bon fonctionnement. Vu que certains de ces " -"exemples ont un comportement différent en Linux, Windows ou Mac OS X, ils " +"exemples ont un comportement différent en Linux, Windows ou macOS, ils " "contiennent des directives *doctest* dans les commentaires." #: library/ctypes.rst:25 @@ -54,7 +53,7 @@ msgid "" "`c_long`. So, you should not be confused if :class:`c_long` is printed if " "you would expect :class:`c_int` --- they are actually the same type." msgstr "" -"Remarque : Le type :class:`c_int` du module apparaît dans certains de ces " +"Remarque : le type :class:`c_int` du module apparaît dans certains de ces " "exemples. Sur les plates-formes où ``sizeof(long) == sizeof(int)``, ce type " "est un alias de :class:`c_long`. Ne soyez donc pas surpris si :class:" "`c_long` s'affiche là où vous vous attendiez à :class:`c_int` — il s'agit " @@ -867,7 +866,6 @@ msgid "Structure/union alignment and byte order" msgstr "Alignement et boutisme des structures et des unions" #: library/ctypes.rst:619 -#, fuzzy msgid "" "By default, Structure and Union fields are aligned in the same way the C " "compiler does it. It is possible to override this behavior by specifying a :" @@ -1159,7 +1157,6 @@ msgstr "" "plus tard, après avoir défini la classe ::" #: library/ctypes.rst:918 -#, fuzzy msgid "" "Let's try it. We create two instances of ``cell``, and let them point to " "each other, and finally follow the pointer chain a few times::" @@ -1613,12 +1610,11 @@ msgid "Here are some examples::" msgstr "Voici quelques exemples :" #: library/ctypes.rst:1291 -#, fuzzy msgid "" "On macOS, :func:`find_library` tries several predefined naming schemes and " "paths to locate the library, and returns a full pathname if successful::" msgstr "" -"Sous OS X, :func:`find_library` regarde dans des chemins et conventions de " +"Sous macOS, :func:`find_library` regarde dans des chemins et conventions de " "chemins prédéfinies pour trouver la bibliothèque et en renvoie le chemin " "complet si elle la trouve :" @@ -1680,12 +1676,22 @@ msgid "" "which DLL is not found, you need to find the list of dependent DLLs and " "determine which one is not found using Windows debugging and tracing tools." msgstr "" +"En Windows, créer une instance de :class:`CDLL` peut échouer, même si une " +"DLL du bon nom existe. Quand une des dépendances de la DLL à charger ne peut " +"pas être trouvée, une :exc:`OSError` est levée avec le message *\"[WinError " +"126] The specified module could not be found\".* Ce message d'erreur ne " +"contient pas le nom de la DLL manquante car l'API Windows ne fournit pas " +"cette information. Cela rend l'erreur délicate à analyser ; pour la " +"résoudre, il faut lister toutes les dépendances de la DLL et trouver celle " +"qui manque en utilisant des outils de débogage et de traçage Windows." #: library/ctypes.rst:1341 msgid "" "`Microsoft DUMPBIN tool `_ -- A tool to find DLL dependents." msgstr "" +"`DUMPBIN `_ — un " +"utilitaire Microsoft pour lister les dépendances d'une DLL." #: library/ctypes.rst:1347 msgid "" @@ -1894,7 +1900,7 @@ msgstr "" #: library/ctypes.rst:1460 msgid "The system handle used to access the library." -msgstr "" +msgstr "Le lien système d'accès à la bibliothèque." #: library/ctypes.rst:1465 msgid "The name of the library passed in the constructor." @@ -1979,14 +1985,12 @@ msgstr "" "utiliser." #: library/ctypes.rst:1525 -#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlopen`` with argument " "``name``." msgstr "" -"Charger une bibliothèque à l'aide d'un de ces objets avec en argument " -"``name``, le nom de la bibliothèque (une chaîne de caractères), lève un :ref:" -"`évènement d'audit ` ``ctypes.dlopen``." +"Lève un :ref:`évènement d'audit ` ``ctypes.dlopen``, avec en " +"argument ``name``." #: library/ctypes.rst:1527 msgid "" @@ -2207,6 +2211,8 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.seh_exception`` with " "argument ``code``." msgstr "" +"Charger une bibliothèque à l'aide d'un de ces objets avec en argument " +"``name``, le nom de la bibliothèque (une chaîne de caractères), l" #: library/ctypes.rst:1630 msgid "" @@ -2257,6 +2263,14 @@ msgid "" "decorator factories, and as such, be applied to functions through the " "``@wrapper`` syntax. See :ref:`ctypes-callback-functions` for examples." msgstr "" +"Il est aussi possible de créer des fonctions externes en instancier des " +"prototypes de fonction. Les prototypes de fonction ressemblent beaucoup aux " +"prototypes de fonctions en C ; ils décrivent une fonction (type de retour, " +"type des arguments, convention d'appel) sans préciser son implémentation. " +"Les fabriques de fonction prennent en entrée le type de retour désiré et le " +"type des arguments de la fonction, et peuvent êter utilisées comme des " +"décorateurs de fabrique et ainsi, s'appliquer à des fonctions avec la " +"syntaxe ``@wrapper``. Voir :`ctypes-callback-functions` pour des exemples." #: library/ctypes.rst:1657 msgid "" From 627c7312816a2e289cde68294f84316347625a50 Mon Sep 17 00:00:00 2001 From: awecx Date: Sun, 31 Oct 2021 19:08:04 +0100 Subject: [PATCH 2/7] premier jet --- library/ctypes.po | 955 ++++++++++++++++++++++++---------------------- 1 file changed, 489 insertions(+), 466 deletions(-) diff --git a/library/ctypes.po b/library/ctypes.po index f315bb420..1b84e63f6 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-09-23 16:16+0200\n" -"PO-Revision-Date: 2021-10-30 16:56+0200\n" +"PO-Revision-Date: 2021-10-31 19:07+0100\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -27,9 +27,9 @@ msgid "" msgstr "" ":mod:`ctypes` est une bibliothèque d'appel à des fonctions externes en " "python. Elle fournit des types de données compatibles avec le langage C et " -"permet d'appeler des fonctions depuis des DLL ou des bibliothèques " -"partagées, rendant ainsi possible l'interfaçage de ces bibliothèques avec du " -"pur code Python." +"permet d'appeler des fonctions depuis des DLL ou des bibliothèques partagées, " +"rendant ainsi possible l'interfaçage de ces bibliothèques avec du pur code " +"Python." #: library/ctypes.rst:19 msgid "ctypes tutorial" @@ -50,14 +50,14 @@ msgstr "" msgid "" "Note: Some code samples reference the ctypes :class:`c_int` type. On " "platforms where ``sizeof(long) == sizeof(int)`` it is an alias to :class:" -"`c_long`. So, you should not be confused if :class:`c_long` is printed if " -"you would expect :class:`c_int` --- they are actually the same type." +"`c_long`. So, you should not be confused if :class:`c_long` is printed if you " +"would expect :class:`c_int` --- they are actually the same type." msgstr "" "Remarque : le type :class:`c_int` du module apparaît dans certains de ces " "exemples. Sur les plates-formes où ``sizeof(long) == sizeof(int)``, ce type " -"est un alias de :class:`c_long`. Ne soyez donc pas surpris si :class:" -"`c_long` s'affiche là où vous vous attendiez à :class:`c_int` — il s'agit " -"bien du même type." +"est un alias de :class:`c_long`. Ne soyez donc pas surpris si :class:`c_long` " +"s'affiche là où vous vous attendiez à :class:`c_int` — il s'agit bien du même " +"type." #: library/ctypes.rst:33 msgid "Loading dynamic link libraries" @@ -86,9 +86,9 @@ msgstr "" "convention d'appel standard ``cdecl``, alors que les bibliothèques qui se " "chargent avec *windll* utilisent la convention d'appel ``stdcall``. *oledll* " "utilise elle aussi la convention ``stdcall`` et suppose que les fonctions " -"renvoient un code d'erreur :c:type:`HRESULT` de Windows. Ce code d'erreur " -"est utilisé pour lever automatiquement une :class:`OSError` quand l'appel de " -"la fonction échoue." +"renvoient un code d'erreur :c:type:`HRESULT` de Windows. Ce code d'erreur est " +"utilisé pour lever automatiquement une :class:`OSError` quand l'appel de la " +"fonction échoue." #: library/ctypes.rst:46 msgid "" @@ -100,12 +100,12 @@ msgstr "" #: library/ctypes.rst:51 msgid "" -"Here are some examples for Windows. Note that ``msvcrt`` is the MS standard " -"C library containing most standard C functions, and uses the cdecl calling " +"Here are some examples for Windows. Note that ``msvcrt`` is the MS standard C " +"library containing most standard C functions, and uses the cdecl calling " "convention::" msgstr "" -"Voici quelques exemples Windows. ``msvcrt`` est la bibliothèque standard C " -"de Microsoft qui contient la plupart des fonctions standards C. Elle suit la " +"Voici quelques exemples Windows. ``msvcrt`` est la bibliothèque standard C de " +"Microsoft qui contient la plupart des fonctions standards C. Elle suit la " "convention d'appel *cdecl* ::" #: library/ctypes.rst:63 @@ -114,10 +114,10 @@ msgstr "Windows ajoute le suffixe habituel ``.dll`` automatiquement." #: library/ctypes.rst:66 msgid "" -"Accessing the standard C library through ``cdll.msvcrt`` will use an " -"outdated version of the library that may be incompatible with the one being " -"used by Python. Where possible, use native Python functionality, or else " -"import and use the ``msvcrt`` module." +"Accessing the standard C library through ``cdll.msvcrt`` will use an outdated " +"version of the library that may be incompatible with the one being used by " +"Python. Where possible, use native Python functionality, or else import and " +"use the ``msvcrt`` module." msgstr "" "Accéder à la bibliothèque standard C par ``cdll.msvcrt`` utilise une version " "obsolète de la bibliothèque qui peut avoir des problèmes de compatibilité " @@ -127,10 +127,10 @@ msgstr "" #: library/ctypes.rst:71 msgid "" -"On Linux, it is required to specify the filename *including* the extension " -"to load a library, so attribute access can not be used to load libraries. " -"Either the :meth:`LoadLibrary` method of the dll loaders should be used, or " -"you should load the library by creating an instance of CDLL by calling the " +"On Linux, it is required to specify the filename *including* the extension to " +"load a library, so attribute access can not be used to load libraries. Either " +"the :meth:`LoadLibrary` method of the dll loaders should be used, or you " +"should load the library by creating an instance of CDLL by calling the " "constructor::" msgstr "" "Pour charger une bibliothèque en Linux, il faut passer le nom du fichier " @@ -161,8 +161,8 @@ msgstr "" "souvent une version ANSI et une version UNICODE d'une fonction. La version " "UNICODE est exportée avec un ``W`` à la fin, et la version ANSI avec un " "``A``. La fonction *win32* ``GetModuleHandle``, qui renvoie un *gestionnaire " -"de module* à partir de son nom, a le prototype C suivant (c'est une macro " -"qui décide d'exporter l'une ou l'autre à travers ``GetModuleHandle``, selon " +"de module* à partir de son nom, a le prototype C suivant (c'est une macro qui " +"décide d'exporter l'une ou l'autre à travers ``GetModuleHandle``, selon " "qu'UNICODE est définie ou non) ::" #: library/ctypes.rst:119 @@ -172,9 +172,9 @@ msgid "" "explicitly, and then call it with bytes or string objects respectively." msgstr "" "*windll* n'en choisit pas une par magie, il faut accéder à la bonne en " -"écrivant explicitement ``GetModuleHandleA`` ou ``GetModuleHandleW`` et en " -"les appelant ensuite avec des objets octets ou avec des chaînes de " -"caractères, respectivement." +"écrivant explicitement ``GetModuleHandleA`` ou ``GetModuleHandleW`` et en les " +"appelant ensuite avec des objets octets ou avec des chaînes de caractères, " +"respectivement." #: library/ctypes.rst:123 msgid "" @@ -183,14 +183,13 @@ msgid "" "`getattr` to retrieve the function::" msgstr "" "Les DLL exportent parfois des fonctions dont les noms ne sont pas des " -"identifiants Python valides, comme ``\"??2@YAPAXI@Z\"``. Dans ce cas, il " -"faut utiliser :func:`getattr` pour accéder à la fonction ::" +"identifiants Python valides, comme ``\"??2@YAPAXI@Z\"``. Dans ce cas, il faut " +"utiliser :func:`getattr` pour accéder à la fonction ::" #: library/ctypes.rst:131 msgid "" "On Windows, some dlls export functions not by name but by ordinal. These " -"functions can be accessed by indexing the dll object with the ordinal " -"number::" +"functions can be accessed by indexing the dll object with the ordinal number::" msgstr "" "Sous Windows, certaines DLL exportent des fonctions à travers un indice " "plutôt qu'à travers un nom. On accède à une fonction en indiçant l'objet DLL " @@ -214,8 +213,8 @@ msgstr "" #: library/ctypes.rst:155 msgid "" -"This example calls both functions with a ``NULL`` pointer (``None`` should " -"be used as the ``NULL`` pointer)::" +"This example calls both functions with a ``NULL`` pointer (``None`` should be " +"used as the ``NULL`` pointer)::" msgstr "" "Cet exemple appelle les deux fonctions avec un pointeur ``NULL`` (on utilise " "``None`` pour passer un pointeur ``NULL``) ::" @@ -230,23 +229,23 @@ msgstr "" #: library/ctypes.rst:179 msgid "" -"To find out the correct calling convention you have to look into the C " -"header file or the documentation for the function you want to call." +"To find out the correct calling convention you have to look into the C header " +"file or the documentation for the function you want to call." msgstr "" "Pour déterminer la convention d'appel, il faut consulter l'en-tête C ou la " "documentation de la fonction à appeler." #: library/ctypes.rst:182 msgid "" -"On Windows, :mod:`ctypes` uses win32 structured exception handling to " -"prevent crashes from general protection faults when functions are called " -"with invalid argument values::" +"On Windows, :mod:`ctypes` uses win32 structured exception handling to prevent " +"crashes from general protection faults when functions are called with invalid " +"argument values::" msgstr "" -"En Windows, :mod:`ctypes` tire profit de la gestion structurée des " -"exceptions (*structured exception handling*) *win32* pour empêcher les " -"plantages dus à des interruptions, afin de préserver la protection globale " -"(*general protection faults*) du système, lorsque des fonctions sont " -"appelées avec un nombre incorrect d'arguments ::" +"En Windows, :mod:`ctypes` tire profit de la gestion structurée des exceptions " +"(*structured exception handling*) *win32* pour empêcher les plantages dus à " +"des interruptions, afin de préserver la protection globale (*general " +"protection faults*) du système, lorsque des fonctions sont appelées avec un " +"nombre incorrect d'arguments ::" #: library/ctypes.rst:192 msgid "" @@ -258,8 +257,7 @@ msgstr "" "Cependant, il y a suffisamment de façons de faire planter Python avec :mod:" "`ctypes`, donc il faut être prudent dans tous les cas. Le module :mod:" "`faulthandler` est pratique pour déboguer les plantages (p. ex. dus à des " -"erreurs de segmentation produites par des appels erronés à la bibliothèque " -"C)." +"erreurs de segmentation produites par des appels erronés à la bibliothèque C)." #: library/ctypes.rst:197 msgid "" @@ -268,8 +266,8 @@ msgid "" "calls. ``None`` is passed as a C ``NULL`` pointer, bytes objects and strings " "are passed as pointer to the memory block that contains their data (:c:type:" "`char *` or :c:type:`wchar_t *`). Python integers are passed as the " -"platforms default C :c:type:`int` type, their value is masked to fit into " -"the C type." +"platforms default C :c:type:`int` type, their value is masked to fit into the " +"C type." msgstr "" "``None``, les entiers, les objets octets et les chaînes de caractères " "(Unicode) sont les seuls types natifs de Python qui peuvent être directement " @@ -550,18 +548,18 @@ msgid "" msgstr "" "Cependant, prenez garde à ne pas en passer à des fonctions qui prennent en " "paramètre des pointeurs sur de la mémoire modifiable. S'il vous faut de la " -"mémoire modifiable, *ctypes* fournit la fonction :func:" -"`create_string_buffer` qui en crée de plusieurs façons. L'attribut ``raw`` " -"permet d'accéder à (ou de modifier) un bloc mémoire ; l'attribut ``value`` " -"permet d'y accéder comme à une chaîne de caractères terminée par NUL ::" +"mémoire modifiable, *ctypes* fournit la fonction :func:`create_string_buffer` " +"qui en crée de plusieurs façons. L'attribut ``raw`` permet d'accéder à (ou de " +"modifier) un bloc mémoire ; l'attribut ``value`` permet d'y accéder comme à " +"une chaîne de caractères terminée par NUL ::" #: library/ctypes.rst:333 msgid "" "The :func:`create_string_buffer` function replaces the :func:`c_buffer` " "function (which is still available as an alias), as well as the :func:" -"`c_string` function from earlier ctypes releases. To create a mutable " -"memory block containing unicode characters of the C type :c:type:`wchar_t` " -"use the :func:`create_unicode_buffer` function." +"`c_string` function from earlier ctypes releases. To create a mutable memory " +"block containing unicode characters of the C type :c:type:`wchar_t` use the :" +"func:`create_unicode_buffer` function." msgstr "" "La fonction :func:`create_string_buffer` remplace les fonctions :func:" "`c_buffer` (qui en reste un alias) et :func:`c_string` des versions " @@ -580,8 +578,8 @@ msgid "" "from within *IDLE* or *PythonWin*::" msgstr "" "*printf* utilise la vraie sortie standard, et non :data:`sys.stdout` ; les " -"exemples suivants ne fonctionnent donc que dans une invite de commande et " -"non depuis *IDLE* or *PythonWin* ::" +"exemples suivants ne fonctionnent donc que dans une invite de commande et non " +"depuis *IDLE* or *PythonWin* ::" #: library/ctypes.rst:365 msgid "" @@ -589,10 +587,10 @@ msgid "" "bytes objects have to be wrapped in their corresponding :mod:`ctypes` type, " "so that they can be converted to the required C data type::" msgstr "" -"Comme mentionné plus haut, tous les types Python (les entiers, les chaînes " -"de caractères et les objets octet exceptés) doivent être encapsulés dans " -"leur type :mod:`ctypes` correspondant pour pouvoir être convertis dans le " -"type C requis ::" +"Comme mentionné plus haut, tous les types Python (les entiers, les chaînes de " +"caractères et les objets octet exceptés) doivent être encapsulés dans leur " +"type :mod:`ctypes` correspondant pour pouvoir être convertis dans le type C " +"requis ::" #: library/ctypes.rst:378 msgid "Calling functions with your own custom data types" @@ -652,31 +650,31 @@ msgid "" "prototype for a C function), and tries to convert the arguments to valid " "types::" msgstr "" -"Définir un format empêche de passer des arguments de type incompatible " -"(comme le fait le prototype d'une fonction C) et tente de convertir les " -"arguments en des types valides ::" +"Définir un format empêche de passer des arguments de type incompatible (comme " +"le fait le prototype d'une fonction C) et tente de convertir les arguments en " +"des types valides ::" #: library/ctypes.rst:431 msgid "" "If you have defined your own classes which you pass to function calls, you " "have to implement a :meth:`from_param` class method for them to be able to " "use them in the :attr:`argtypes` sequence. The :meth:`from_param` class " -"method receives the Python object passed to the function call, it should do " -"a typecheck or whatever is needed to make sure this object is acceptable, " -"and then return the object itself, its :attr:`_as_parameter_` attribute, or " -"whatever you want to pass as the C function argument in this case. Again, " -"the result should be an integer, string, bytes, a :mod:`ctypes` instance, or " -"an object with an :attr:`_as_parameter_` attribute." +"method receives the Python object passed to the function call, it should do a " +"typecheck or whatever is needed to make sure this object is acceptable, and " +"then return the object itself, its :attr:`_as_parameter_` attribute, or " +"whatever you want to pass as the C function argument in this case. Again, the " +"result should be an integer, string, bytes, a :mod:`ctypes` instance, or an " +"object with an :attr:`_as_parameter_` attribute." msgstr "" "Pour appeler une fonction avec votre propre classe définie dans la séquence :" "attr:`argtypes`, il est nécessaire d'implémenter une méthode de classe :meth:" -"`from_param`. La méthode de classe :meth:`from_param` récupère l'objet " -"Python passé à la fonction et doit faire une vérification de type ou tout ce " -"qui est nécessaire pour s'assurer que l'objet est valide, puis renvoie " -"l'objet lui-même, son attribut :attr:`_as_parameter_`, ou tout ce que vous " -"voulez passer comme argument fonction C dans ce cas. Encore une fois, il " -"convient que le résultat soit un entier, une chaîne, des octets, une " -"instance :mod:`ctypes` ou un objet avec un attribut :attr:`_as_parameter_`." +"`from_param`. La méthode de classe :meth:`from_param` récupère l'objet Python " +"passé à la fonction et doit faire une vérification de type ou tout ce qui est " +"nécessaire pour s'assurer que l'objet est valide, puis renvoie l'objet lui-" +"même, son attribut :attr:`_as_parameter_`, ou tout ce que vous voulez passer " +"comme argument fonction C dans ce cas. Encore une fois, il convient que le " +"résultat soit un entier, une chaîne, des octets, une instance :mod:`ctypes` " +"ou un objet avec un attribut :attr:`_as_parameter_`." #: library/ctypes.rst:445 msgid "Return types" @@ -685,8 +683,8 @@ msgstr "Types de sortie" #: library/ctypes.rst:447 msgid "" "By default functions are assumed to return the C :c:type:`int` type. Other " -"return types can be specified by setting the :attr:`restype` attribute of " -"the function object." +"return types can be specified by setting the :attr:`restype` attribute of the " +"function object." msgstr "" "Le module suppose que toutes les fonctions renvoient par défaut un :c:type:" "`int` C. Pour préciser un autre type de sortie, il faut définir l'attribut :" @@ -698,14 +696,14 @@ msgid "" "expects a string pointer and a char, and returns a pointer to a string::" msgstr "" "Voici un exemple plus poussé. Celui-ci utilise la fonction ``strchr``, qui " -"prend en paramètres un pointeur vers une chaîne et un caractère. Elle " -"renvoie un pointeur sur une chaîne de caractères ::" +"prend en paramètres un pointeur vers une chaîne et un caractère. Elle renvoie " +"un pointeur sur une chaîne de caractères ::" #: library/ctypes.rst:464 msgid "" "If you want to avoid the ``ord(\"x\")`` calls above, you can set the :attr:" -"`argtypes` attribute, and the second argument will be converted from a " -"single character Python bytes object into a C char::" +"`argtypes` attribute, and the second argument will be converted from a single " +"character Python bytes object into a C char::" msgstr "" "Pour économiser l'appel ``ord(\"x\")``, il est possible de définir " "l'attribut :attr:`argtypes` ; le second argument, un objet octet à un seul " @@ -713,9 +711,9 @@ msgstr "" #: library/ctypes.rst:482 msgid "" -"You can also use a callable Python object (a function or a class for " -"example) as the :attr:`restype` attribute, if the foreign function returns " -"an integer. The callable will be called with the *integer* the C function " +"You can also use a callable Python object (a function or a class for example) " +"as the :attr:`restype` attribute, if the foreign function returns an " +"integer. The callable will be called with the *integer* the C function " "returns, and the result of this call will be used as the result of your " "function call. This is useful to check for error return values and " "automatically raise an exception::" @@ -729,16 +727,16 @@ msgstr "" #: library/ctypes.rst:505 msgid "" -"``WinError`` is a function which will call Windows ``FormatMessage()`` api " -"to get the string representation of an error code, and *returns* an " -"exception. ``WinError`` takes an optional error code parameter, if no one is " -"used, it calls :func:`GetLastError` to retrieve it." +"``WinError`` is a function which will call Windows ``FormatMessage()`` api to " +"get the string representation of an error code, and *returns* an exception. " +"``WinError`` takes an optional error code parameter, if no one is used, it " +"calls :func:`GetLastError` to retrieve it." msgstr "" "``WinError`` appelle l'API Windows ``FormatMessage()`` pour obtenir une " -"représentation de la chaîne de caractères qui correspond au code d'erreur, " -"et *renvoie* une exception. ``WinError`` prend en paramètre — optionnel — le " -"code d'erreur. Si celui-ci n'est pas passé, elle appelle :func:" -"`GetLastError` pour le récupérer." +"représentation de la chaîne de caractères qui correspond au code d'erreur, et " +"*renvoie* une exception. ``WinError`` prend en paramètre — optionnel — le " +"code d'erreur. Si celui-ci n'est pas passé, elle appelle :func:`GetLastError` " +"pour le récupérer." #: library/ctypes.rst:510 msgid "" @@ -770,12 +768,12 @@ msgid "" ":mod:`ctypes` exports the :func:`byref` function which is used to pass " "parameters by reference. The same effect can be achieved with the :func:" "`pointer` function, although :func:`pointer` does a lot more work since it " -"constructs a real pointer object, so it is faster to use :func:`byref` if " -"you don't need the pointer object in Python itself::" +"constructs a real pointer object, so it is faster to use :func:`byref` if you " +"don't need the pointer object in Python itself::" msgstr "" ":mod:`ctypes` contient la fonction :func:`byref` qui permet de passer des " -"paramètres par référence. La fonction :func:`pointer` a la même utilité, " -"mais fait plus de travail car :func:`pointer` construit un véritable objet " +"paramètres par référence. La fonction :func:`pointer` a la même utilité, mais " +"fait plus de travail car :func:`pointer` construit un véritable objet " "pointeur. Ainsi, si vous n'avez pas besoin de cet objet dans votre code " "Python, utiliser :func:`byref` est plus performant ::" @@ -793,13 +791,12 @@ msgstr "" "Les structures et les unions doivent hériter des classes de base :class:" "`Structure` et :class:`Union` définies dans le module :mod:`ctypes`. Chaque " "sous-classe doit définir un attribut :attr:`_fields_`. :attr:`_fields_` doit " -"être une liste de *paires*, contenant un *nom de champ* et un *type de " -"champ*." +"être une liste de *paires*, contenant un *nom de champ* et un *type de champ*." #: library/ctypes.rst:552 msgid "" -"The field type must be a :mod:`ctypes` type like :class:`c_int`, or any " -"other derived :mod:`ctypes` type: structure, union, array, pointer." +"The field type must be a :mod:`ctypes` type like :class:`c_int`, or any other " +"derived :mod:`ctypes` type: structure, union, array, pointer." msgstr "" "Le type de champ doit être un type :mod:`ctypes` comme :class:`c_int` ou un " "type :mod:`ctypes` dérivé : structure, union, tableau ou pointeur." @@ -833,8 +830,7 @@ msgstr "" #: library/ctypes.rst:592 msgid "" -"Nested structures can also be initialized in the constructor in several " -"ways::" +"Nested structures can also be initialized in the constructor in several ways::" msgstr "" "Une structure encapsulée peut être instanciée par un constructeur de " "plusieurs façons ::" @@ -844,16 +840,16 @@ msgid "" "Field :term:`descriptor`\\s can be retrieved from the *class*, they are " "useful for debugging because they can provide useful information::" msgstr "" -"Il est possible de récupérer les :term:`descripteurs ` des " -"champs depuis la *classe*. Ils sont importants pour déboguer car ils " -"contiennent des informations utiles ::" +"Il est possible de récupérer les :term:`descripteurs ` des champs " +"depuis la *classe*. Ils sont importants pour déboguer car ils contiennent des " +"informations utiles ::" #: library/ctypes.rst:611 msgid "" ":mod:`ctypes` does not support passing unions or structures with bit-fields " "to functions by value. While this may work on 32-bit x86, it's not " -"guaranteed by the library to work in the general case. Unions and " -"structures with bit-fields should always be passed to functions by pointer." +"guaranteed by the library to work in the general case. Unions and structures " +"with bit-fields should always be passed to functions by pointer." msgstr "" ":mod:`ctypes` ne prend pas en charge le passage par valeur des unions ou des " "structures avec des champs de bits. Bien que cela puisse fonctionner sur des " @@ -869,9 +865,9 @@ msgstr "Alignement et boutisme des structures et des unions" msgid "" "By default, Structure and Union fields are aligned in the same way the C " "compiler does it. It is possible to override this behavior by specifying a :" -"attr:`_pack_` class attribute in the subclass definition. This must be set " -"to a positive integer and specifies the maximum alignment for the fields. " -"This is what ``#pragma pack(n)`` also does in MSVC." +"attr:`_pack_` class attribute in the subclass definition. This must be set to " +"a positive integer and specifies the maximum alignment for the fields. This " +"is what ``#pragma pack(n)`` also does in MSVC." msgstr "" "Par défaut les champs d'une *Structure* ou d'une *Union* sont alignés de la " "même manière que le ferait un compilateur C. Ce comportement peut être " @@ -881,17 +877,17 @@ msgstr "" #: library/ctypes.rst:625 msgid "" -":mod:`ctypes` uses the native byte order for Structures and Unions. To " -"build structures with non-native byte order, you can use one of the :class:" +":mod:`ctypes` uses the native byte order for Structures and Unions. To build " +"structures with non-native byte order, you can use one of the :class:" "`BigEndianStructure`, :class:`LittleEndianStructure`, :class:" -"`BigEndianUnion`, and :class:`LittleEndianUnion` base classes. These " -"classes cannot contain pointer fields." +"`BigEndianUnion`, and :class:`LittleEndianUnion` base classes. These classes " +"cannot contain pointer fields." msgstr "" ":mod:`ctypes` suit le boutisme natif pour les *Structure* et les *Union*. " "Pour construire des structures avec un boutisme différent, utilisez les " -"classes de base :class:`BigEndianStructure`, :class:" -"`LittleEndianStructure`, :class:`BigEndianUnion` ou :class:" -"`LittleEndianUnion`. Ces classes ne peuvent pas avoir de champ pointeur." +"classes de base :class:`BigEndianStructure`, :class:`LittleEndianStructure`, :" +"class:`BigEndianUnion` ou :class:`LittleEndianUnion`. Ces classes ne peuvent " +"pas avoir de champ pointeur." #: library/ctypes.rst:635 msgid "Bit fields in structures and unions" @@ -903,9 +899,9 @@ msgid "" "fields are only possible for integer fields, the bit width is specified as " "the third item in the :attr:`_fields_` tuples::" msgstr "" -"Il est possible de créer des structures et des unions contenant des champs " -"de bits. Seuls les entiers peuvent être des champs de bits, le nombre de " -"bits est défini dans le troisième champ du *n*-uplet :attr:`_fields_` ::" +"Il est possible de créer des structures et des unions contenant des champs de " +"bits. Seuls les entiers peuvent être des champs de bits, le nombre de bits " +"est défini dans le troisième champ du *n*-uplet :attr:`_fields_` ::" #: library/ctypes.rst:655 msgid "Arrays" @@ -913,11 +909,10 @@ msgstr "Tableaux" #: library/ctypes.rst:657 msgid "" -"Arrays are sequences, containing a fixed number of instances of the same " -"type." +"Arrays are sequences, containing a fixed number of instances of the same type." msgstr "" -"Les tableaux sont des séquences qui contiennent un nombre fixe d'instances " -"du même type." +"Les tableaux sont des séquences qui contiennent un nombre fixe d'instances du " +"même type." #: library/ctypes.rst:659 msgid "" @@ -929,8 +924,8 @@ msgstr "" #: library/ctypes.rst:664 msgid "" -"Here is an example of a somewhat artificial data type, a structure " -"containing 4 POINTs among other stuff::" +"Here is an example of a somewhat artificial data type, a structure containing " +"4 POINTs among other stuff::" msgstr "" "Voici un exemple — un peu artificiel — d'une structure contenant, entre " "autres, 4 POINTs ::" @@ -941,8 +936,8 @@ msgstr "Comme d'habitude, on crée les instances en appelant la classe ::" #: library/ctypes.rst:686 msgid "" -"The above code print a series of ``0 0`` lines, because the array contents " -"is initialized to zeros." +"The above code print a series of ``0 0`` lines, because the array contents is " +"initialized to zeros." msgstr "" "Le code précédent affiche une suite de ``0 0`` car le contenu du tableau est " "initialisé avec des zéros." @@ -981,9 +976,8 @@ msgstr "" #: library/ctypes.rst:731 msgid "" -"Assigning another :class:`c_int` instance to the pointer's contents " -"attribute would cause the pointer to point to the memory location where this " -"is stored::" +"Assigning another :class:`c_int` instance to the pointer's contents attribute " +"would cause the pointer to point to the memory location where this is stored::" msgstr "" "Affecter une autre instance de :class:`c_int` à l'attribut *contents* du " "pointeur fait pointer le pointeur vers l'adresse mémoire de cette nouvelle " @@ -1008,8 +1002,8 @@ msgstr "" "Si vous êtes sûr de vous, vous pouvez utiliser d'autres valeurs que 0, comme " "en C : il est ainsi possible de modifier une zone mémoire de votre choix. De " "manière générale cette fonctionnalité ne s'utilise que sur un pointeur " -"renvoyé par une fonction C, pointeur que vous *savez* pointer vers un " -"tableau et non sur un seul élément." +"renvoyé par une fonction C, pointeur que vous *savez* pointer vers un tableau " +"et non sur un seul élément." #: library/ctypes.rst:764 msgid "" @@ -1018,10 +1012,10 @@ msgid "" "the :func:`POINTER` function, which accepts any :mod:`ctypes` type, and " "returns a new type::" msgstr "" -"Sous le capot, la fonction :func:`pointer` fait plus que simplement créer " -"une instance de pointeur ; elle doit d'abord créer un type « pointeur " -"sur… ». Cela s'effectue avec la fonction :func:`POINTER`, qui prend en " -"paramètre n'importe quel type :mod:`ctypes` et renvoie un nouveau type ::" +"Sous le capot, la fonction :func:`pointer` fait plus que simplement créer une " +"instance de pointeur ; elle doit d'abord créer un type « pointeur sur… ». " +"Cela s'effectue avec la fonction :func:`POINTER`, qui prend en paramètre " +"n'importe quel type :mod:`ctypes` et renvoie un nouveau type ::" #: library/ctypes.rst:780 msgid "" @@ -1049,10 +1043,10 @@ msgid "" "Usually, ctypes does strict type checking. This means, if you have " "``POINTER(c_int)`` in the :attr:`argtypes` list of a function or as the type " "of a member field in a structure definition, only instances of exactly the " -"same type are accepted. There are some exceptions to this rule, where " -"ctypes accepts other objects. For example, you can pass compatible array " -"instances instead of pointer types. So, for ``POINTER(c_int)``, ctypes " -"accepts an array of c_int::" +"same type are accepted. There are some exceptions to this rule, where ctypes " +"accepts other objects. For example, you can pass compatible array instances " +"instead of pointer types. So, for ``POINTER(c_int)``, ctypes accepts an " +"array of c_int::" msgstr "" "En général, *ctypes* respecte un typage fort. Cela signifie que si un " "``POINTER(c_int)`` est présent dans la liste des :attr:`argtypes` d'une " @@ -1085,17 +1079,16 @@ msgstr "" #: library/ctypes.rst:842 msgid "" "Sometimes you have instances of incompatible types. In C, you can cast one " -"type into another type. :mod:`ctypes` provides a :func:`cast` function " -"which can be used in the same way. The ``Bar`` structure defined above " -"accepts ``POINTER(c_int)`` pointers or :class:`c_int` arrays for its " -"``values`` field, but not instances of other types::" +"type into another type. :mod:`ctypes` provides a :func:`cast` function which " +"can be used in the same way. The ``Bar`` structure defined above accepts " +"``POINTER(c_int)`` pointers or :class:`c_int` arrays for its ``values`` " +"field, but not instances of other types::" msgstr "" "Parfois il faut gérer des incompatibilités entre les types. En C, il est " -"possible de convertir un type en un autre. :mod:`ctypes` fournit la " -"fonction :func:`cast` qui permet la même chose. La structure ``Bar`` ci-" -"dessus accepte des pointeurs ``POINTER(c_int)`` ou des tableaux de :class:" -"`c_int` comme valeur pour le champ ``values``, mais pas des instances " -"d'autres types ::" +"possible de convertir un type en un autre. :mod:`ctypes` fournit la fonction :" +"func:`cast` qui permet la même chose. La structure ``Bar`` ci-dessus accepte " +"des pointeurs ``POINTER(c_int)`` ou des tableaux de :class:`c_int` comme " +"valeur pour le champ ``values``, mais pas des instances d'autres types ::" #: library/ctypes.rst:854 msgid "For these cases, the :func:`cast` function is handy." @@ -1118,8 +1111,8 @@ msgstr "" #: library/ctypes.rst:867 msgid "" -"So, :func:`cast` can be used to assign to the ``values`` field of ``Bar`` " -"the structure::" +"So, :func:`cast` can be used to assign to the ``values`` field of ``Bar`` the " +"structure::" msgstr "" "Ainsi, la fonction :func:`cast` permet de remplir le champ ``values`` de la " "structure ``Bar`` ::" @@ -1130,8 +1123,8 @@ msgstr "Types incomplets" #: library/ctypes.rst:882 msgid "" -"*Incomplete Types* are structures, unions or arrays whose members are not " -"yet specified. In C, they are specified by forward declarations, which are " +"*Incomplete Types* are structures, unions or arrays whose members are not yet " +"specified. In C, they are specified by forward declarations, which are " "defined later::" msgstr "" "Un *type incomplet* est une structure, une union ou un tableau dont les " @@ -1158,8 +1151,8 @@ msgstr "" #: library/ctypes.rst:918 msgid "" -"Let's try it. We create two instances of ``cell``, and let them point to " -"each other, and finally follow the pointer chain a few times::" +"Let's try it. We create two instances of ``cell``, and let them point to each " +"other, and finally follow the pointer chain a few times::" msgstr "" "Essayons. Nous créons deux instances de ``cell``, les faisons pointer l'une " "sur l'autre et enfin nous suivons quelques maillons de la chaîne de " @@ -1179,9 +1172,9 @@ msgstr "" #: library/ctypes.rst:944 msgid "" -"First, you must create a class for the callback function. The class knows " -"the calling convention, the return type, and the number and types of " -"arguments this function will receive." +"First, you must create a class for the callback function. The class knows the " +"calling convention, the return type, and the number and types of arguments " +"this function will receive." msgstr "" "Tout d'abord, il faut créer une classe pour la fonction de rappel. La classe " "connaît la convention d'appel, le type de retour ainsi que le nombre et le " @@ -1202,8 +1195,8 @@ msgstr "" #: library/ctypes.rst:953 msgid "" "Both of these factory functions are called with the result type as first " -"argument, and the callback functions expected argument types as the " -"remaining arguments." +"argument, and the callback functions expected argument types as the remaining " +"arguments." msgstr "" "Le premier paramètre de ces deux fonctions est le type de retour, et les " "suivants sont les types des arguments qu'attend la fonction de rappel." @@ -1224,8 +1217,8 @@ msgid "" ":func:`qsort` must be called with a pointer to the data to sort, the number " "of items in the data array, the size of one item, and a pointer to the " "comparison function, the callback. The callback will then be called with two " -"pointers to items, and it must return a negative integer if the first item " -"is smaller than the second, a zero if they are equal, and a positive integer " +"pointers to items, and it must return a negative integer if the first item is " +"smaller than the second, a zero if they are equal, and a positive integer " "otherwise." msgstr "" ":func:`qsort` doit être appelée avec un pointeur vers la donnée à ordonner, " @@ -1280,19 +1273,19 @@ msgid "" "are used from C code. :mod:`ctypes` doesn't, and if you don't, they may be " "garbage collected, crashing your program when a callback is made." msgstr "" -"Prenez garde à bien conserver une référence à un objet :func:`CFUNCTYPE` " -"tant que celui-ci est utilisé par le code C. :mod:`ctypes` ne le fait pas " -"tout seul et, si vous ne le faites pas, le ramasse-miette pourrait les " -"libérer, ce qui fera planter votre programme quand un appel sera fait." +"Prenez garde à bien conserver une référence à un objet :func:`CFUNCTYPE` tant " +"que celui-ci est utilisé par le code C. :mod:`ctypes` ne le fait pas tout " +"seul et, si vous ne le faites pas, le ramasse-miette pourrait les libérer, ce " +"qui fera planter votre programme quand un appel sera fait." #: library/ctypes.rst:1043 msgid "" "Also, note that if the callback function is called in a thread created " "outside of Python's control (e.g. by the foreign code that calls the " -"callback), ctypes creates a new dummy Python thread on every invocation. " -"This behavior is correct for most purposes, but it means that values stored " -"with :class:`threading.local` will *not* survive across different callbacks, " -"even when those calls are made from the same C thread." +"callback), ctypes creates a new dummy Python thread on every invocation. This " +"behavior is correct for most purposes, but it means that values stored with :" +"class:`threading.local` will *not* survive across different callbacks, even " +"when those calls are made from the same C thread." msgstr "" "Notez aussi que si la fonction de rappel est appelée dans un fil d'exécution " "créé hors de Python (p. ex. par du code externe qui appelle la fonction de " @@ -1314,15 +1307,15 @@ msgid "" "flag given on startup." msgstr "" "Certaines bibliothèques ne se contentent pas d'exporter des fonctions, elles " -"exportent aussi des variables. Par exemple, la bibliothèque Python exporte :" -"c:data:`Py_OptimizeFlag`, un entier valant 0, 1, ou 2 selon que l'option :" +"exportent aussi des variables. Par exemple, la bibliothèque Python exporte :c:" +"data:`Py_OptimizeFlag`, un entier valant 0, 1, ou 2 selon que l'option :" "option:`-O` ou :option:`-OO` soit donnée au démarrage." #: library/ctypes.rst:1060 msgid "" ":mod:`ctypes` can access values like this with the :meth:`in_dll` class " -"methods of the type. *pythonapi* is a predefined symbol giving access to " -"the Python C api::" +"methods of the type. *pythonapi* is a predefined symbol giving access to the " +"Python C api::" msgstr "" ":mod:`ctypes` peut accéder à ce type de valeurs avec les méthodes de classe :" "meth:`in_dll` du type considéré. *pythonapi* est un symbole prédéfini qui " @@ -1339,8 +1332,8 @@ msgstr "" #: library/ctypes.rst:1073 msgid "" -"An extended example which also demonstrates the use of pointers accesses " -"the :c:data:`PyImport_FrozenModules` pointer exported by Python." +"An extended example which also demonstrates the use of pointers accesses the :" +"c:data:`PyImport_FrozenModules` pointer exported by Python." msgstr "" "Le pointeur :c:data:`PyImport_FrozenModules` exposé par Python est un autre " "exemple complet de l'utilisation de pointeurs." @@ -1358,19 +1351,19 @@ msgid "" "frozen modules." msgstr "" "Ce pointeur est initialisé de manière à pointer sur un tableau d'entrées de :" -"c:type:`struct _frozen`, dont tous les membres de la dernière valent " -"``NULL`` ou zéro. Quand un module figé est importé, il est cherché dans ce " -"tableau. Du code tiers peut jouer avec pour construire dynamiquement une " -"collection de module figés." +"c:type:`struct _frozen`, dont tous les membres de la dernière valent ``NULL`` " +"ou zéro. Quand un module figé est importé, il est cherché dans ce tableau. Du " +"code tiers peut jouer avec pour construire dynamiquement une collection de " +"module figés." #: library/ctypes.rst:1083 msgid "" -"So manipulating this pointer could even prove useful. To restrict the " -"example size, we show only how this table can be read with :mod:`ctypes`::" +"So manipulating this pointer could even prove useful. To restrict the example " +"size, we show only how this table can be read with :mod:`ctypes`::" msgstr "" -"Donc manipuler ce pointeur peut même se révéler utile. Pour limiter la " -"taille de l'exemple, nous nous bornons à montrer comment lire ce tableau " -"avec :mod:`ctypes` ::" +"Donc manipuler ce pointeur peut même se révéler utile. Pour limiter la taille " +"de l'exemple, nous nous bornons à montrer comment lire ce tableau avec :mod:" +"`ctypes` ::" #: library/ctypes.rst:1095 msgid "" @@ -1389,10 +1382,10 @@ msgid "" "the loop when we hit the ``NULL`` entry::" msgstr "" "Puisque ``table`` est un ``pointer`` vers un tableau d'entrées de " -"``struct_frozen``, il est possible d'itérer dessus, mais il faut être " -"certain que la boucle se termine, car les pointeurs n'ont pas de taille. Tôt " -"ou tard, il planterait probablement avec une erreur de segmentation ou " -"autre, donc mieux vaut sortir de la boucle quand on lit l'entrée ``NULL`` ::" +"``struct_frozen``, il est possible d'itérer dessus, mais il faut être certain " +"que la boucle se termine, car les pointeurs n'ont pas de taille. Tôt ou tard, " +"il planterait probablement avec une erreur de segmentation ou autre, donc " +"mieux vaut sortir de la boucle quand on lit l'entrée ``NULL`` ::" #: library/ctypes.rst:1120 msgid "" @@ -1400,9 +1393,9 @@ msgid "" "(indicated by the negative ``size`` member) is not well known, it is only " "used for testing. Try it out with ``import __hello__`` for example." msgstr "" -"Le fait que le standard Python possède un module et un paquet figés " -"(indiqués par la valeur négative du membre *size*) est peu connu, cela ne " -"sert qu'aux tests. Essayez avec ``import __hello__`` par exemple." +"Le fait que le standard Python possède un module et un paquet figés (indiqués " +"par la valeur négative du membre *size*) est peu connu, cela ne sert qu'aux " +"tests. Essayez avec ``import __hello__`` par exemple." #: library/ctypes.rst:1128 msgid "Surprises" @@ -1425,23 +1418,23 @@ msgid "" "Hm. We certainly expected the last statement to print ``3 4 1 2``. What " "happened? Here are the steps of the ``rc.a, rc.b = rc.b, rc.a`` line above::" msgstr "" -"Diantre. On s'attendait certainement à ce que le dernier résultat affiche " -"``3 4 1 2``. Que s'est-il passé ? Les étapes de la ligne ``rc.a, rc.b = rc." -"b, rc.a`` ci-dessus sont les suivantes ::" +"Diantre. On s'attendait certainement à ce que le dernier résultat affiche ``3 " +"4 1 2``. Que s'est-il passé ? Les étapes de la ligne ``rc.a, rc.b = rc.b, rc." +"a`` ci-dessus sont les suivantes ::" #: library/ctypes.rst:1161 msgid "" -"Note that ``temp0`` and ``temp1`` are objects still using the internal " -"buffer of the ``rc`` object above. So executing ``rc.a = temp0`` copies the " -"buffer contents of ``temp0`` into ``rc`` 's buffer. This, in turn, changes " -"the contents of ``temp1``. So, the last assignment ``rc.b = temp1``, doesn't " -"have the expected effect." +"Note that ``temp0`` and ``temp1`` are objects still using the internal buffer " +"of the ``rc`` object above. So executing ``rc.a = temp0`` copies the buffer " +"contents of ``temp0`` into ``rc`` 's buffer. This, in turn, changes the " +"contents of ``temp1``. So, the last assignment ``rc.b = temp1``, doesn't have " +"the expected effect." msgstr "" "Les objets ``temp0`` et ``temp1`` utilisent encore le tampon interne de " "l'objet ``rc`` ci-dessus. Donc exécuter ``rc.a = temp0`` copie le contenu du " "tampon de ``temp0`` dans celui de ``rc``. Ce qui, par ricochet, modifie le " -"contenu de ``temp1``. Et donc, la dernière affectation, ``rc.b = temp1``, " -"n'a pas l'effet escompté." +"contenu de ``temp1``. Et donc, la dernière affectation, ``rc.b = temp1``, n'a " +"pas l'effet escompté." #: library/ctypes.rst:1167 msgid "" @@ -1457,8 +1450,7 @@ msgstr "" msgid "" "Another example that may behave differently from what one would expect is " "this::" -msgstr "" -"Un autre exemple de comportement *a priori* inattendu est le suivant ::" +msgstr "Un autre exemple de comportement *a priori* inattendu est le suivant ::" #: library/ctypes.rst:1183 msgid "" @@ -1472,15 +1464,15 @@ msgstr "" msgid "" "Why is it printing ``False``? ctypes instances are objects containing a " "memory block plus some :term:`descriptor`\\s accessing the contents of the " -"memory. Storing a Python object in the memory block does not store the " -"object itself, instead the ``contents`` of the object is stored. Accessing " -"the contents again constructs a new Python object each time!" +"memory. Storing a Python object in the memory block does not store the object " +"itself, instead the ``contents`` of the object is stored. Accessing the " +"contents again constructs a new Python object each time!" msgstr "" -"Pourquoi cela affiche-t'il ``False`` ? Les instances *ctypes* sont des " -"objets qui contiennent un bloc mémoire et des :term:`descriptor` qui donnent " -"accès au contenu du ce bloc. Stocker un objet Python dans le bloc mémoire ne " -"stocke pas l'objet même ; seuls ses ``contents`` le sont. Accéder au " -"``contents`` crée un nouvel objet Python à chaque fois !" +"Pourquoi cela affiche-t'il ``False`` ? Les instances *ctypes* sont des objets " +"qui contiennent un bloc mémoire et des :term:`descriptor` qui donnent accès " +"au contenu du ce bloc. Stocker un objet Python dans le bloc mémoire ne stocke " +"pas l'objet même ; seuls ses ``contents`` le sont. Accéder au ``contents`` " +"crée un nouvel objet Python à chaque fois !" #: library/ctypes.rst:1196 msgid "Variable-sized data types" @@ -1496,17 +1488,16 @@ msgstr "" #: library/ctypes.rst:1200 msgid "" "The :func:`resize` function can be used to resize the memory buffer of an " -"existing ctypes object. The function takes the object as first argument, " -"and the requested size in bytes as the second argument. The memory block " -"cannot be made smaller than the natural memory block specified by the " -"objects type, a :exc:`ValueError` is raised if this is tried::" +"existing ctypes object. The function takes the object as first argument, and " +"the requested size in bytes as the second argument. The memory block cannot " +"be made smaller than the natural memory block specified by the objects type, " +"a :exc:`ValueError` is raised if this is tried::" msgstr "" "La fonction :func:`resize` permet de redimensionner la taille du tampon " "mémoire d'un objet *ctypes* existant. Cette fonction prend l'objet comme " "premier argument et la taille en octets désirée comme second. La taille du " "tampon mémoire ne peut pas être inférieure à celle occupée par un objet " -"unitaire du type considéré. Une :exc:`ValueError` est levée si c'est le " -"cas ::" +"unitaire du type considéré. Une :exc:`ValueError` est levée si c'est le cas ::" #: library/ctypes.rst:1220 msgid "" @@ -1520,14 +1511,14 @@ msgstr "" #: library/ctypes.rst:1232 msgid "" -"Another way to use variable-sized data types with :mod:`ctypes` is to use " -"the dynamic nature of Python, and (re-)define the data type after the " -"required size is already known, on a case by case basis." +"Another way to use variable-sized data types with :mod:`ctypes` is to use the " +"dynamic nature of Python, and (re-)define the data type after the required " +"size is already known, on a case by case basis." msgstr "" -"Une autre approche pour utiliser des types de donnée à taille flottante " -"avec :mod:`ctypes` consiste à tirer profit de la nature intrinsèquement " -"dynamique de Python et de (re)définir le type de donnée une fois que la " -"taille demandée est connue, au cas-par-cas." +"Une autre approche pour utiliser des types de donnée à taille flottante avec :" +"mod:`ctypes` consiste à tirer profit de la nature intrinsèquement dynamique " +"de Python et de (re)définir le type de donnée une fois que la taille demandée " +"est connue, au cas-par-cas." #: library/ctypes.rst:1240 msgid "ctypes reference" @@ -1550,12 +1541,12 @@ msgstr "" msgid "" "The purpose of the :func:`find_library` function is to locate a library in a " "way similar to what the compiler or runtime loader does (on platforms with " -"several versions of a shared library the most recent should be loaded), " -"while the ctypes library loaders act like when a program is run, and call " -"the runtime loader directly." +"several versions of a shared library the most recent should be loaded), while " +"the ctypes library loaders act like when a program is run, and call the " +"runtime loader directly." msgstr "" -"Le but de la fonction :func:`find_library` est de trouver une bibliothèque " -"de la même façon que le ferait le compilateur ou le chargeur (sur les plates-" +"Le but de la fonction :func:`find_library` est de trouver une bibliothèque de " +"la même façon que le ferait le compilateur ou le chargeur (sur les plates-" "formes avec plusieurs versions de la même bibliothèque, la plus récente est " "chargée), alors que les chargeurs de bibliothèques de *ctypes* se comportent " "de la même façon qu'un programme qui s'exécute, et appellent directement le " @@ -1563,8 +1554,8 @@ msgstr "" #: library/ctypes.rst:1257 msgid "" -"The :mod:`ctypes.util` module provides a function which can help to " -"determine the library to load." +"The :mod:`ctypes.util` module provides a function which can help to determine " +"the library to load." msgstr "" "Le module :mod:`ctypes.util` fournit une fonction pour déterminer quelle " "bibliothèque charger." @@ -1573,14 +1564,14 @@ msgstr "" msgid "" "Try to find a library and return a pathname. *name* is the library name " "without any prefix like *lib*, suffix like ``.so``, ``.dylib`` or version " -"number (this is the form used for the posix linker option :option:`!-l`). " -"If no library can be found, returns ``None``." +"number (this is the form used for the posix linker option :option:`!-l`). If " +"no library can be found, returns ``None``." msgstr "" "Tente de trouver une bibliothèque et en renvoie le chemin. *name* est le nom " "de la bibliothèque sans préfixe — comme *lib* — ni suffixe — comme ``.so``, " "``.dylib`` ou un numéro de version (c.-à-d. la même forme que l'option POSIX " -"de l'éditeur de lien :option:`!-l`). Si la fonction ne parvient pas à " -"trouver de bibliothèque, elle renvoie ``None``." +"de l'éditeur de lien :option:`!-l`). Si la fonction ne parvient pas à trouver " +"de bibliothèque, elle renvoie ``None``." #: library/ctypes.rst:1918 msgid "The exact functionality is system dependent." @@ -1592,15 +1583,14 @@ msgid "" "ldconfig``, ``gcc``, ``objdump`` and ``ld``) to find the library file. It " "returns the filename of the library file." msgstr "" -"Sous Linux, :func:`find_library` essaye de lancer des programmes externes " -"(``/sbin/ldconfig``, ``gcc``, ``objdump`` et ``ld``) pour trouver la " +"Sous Linux, :func:`find_library` essaye de lancer des programmes externes (``/" +"sbin/ldconfig``, ``gcc``, ``objdump`` et ``ld``) pour trouver la " "bibliothèque. Elle renvoie le nom de la bibliothèque sur le disque." #: library/ctypes.rst:1276 msgid "" "On Linux, the value of the environment variable ``LD_LIBRARY_PATH`` is used " -"when searching for libraries, if a library cannot be found by any other " -"means." +"when searching for libraries, if a library cannot be found by any other means." msgstr "" "Sous Linux, si les autres moyens échouent, la fonction utilise la variable " "d'environnement ``LD_LIBRARY_PATH`` pour trouver la bibliothèque." @@ -1632,8 +1622,8 @@ msgstr "" #: library/ctypes.rst:1309 msgid "" "If wrapping a shared library with :mod:`ctypes`, it *may* be better to " -"determine the shared library name at development time, and hardcode that " -"into the wrapper module instead of using :func:`find_library` to locate the " +"determine the shared library name at development time, and hardcode that into " +"the wrapper module instead of using :func:`find_library` to locate the " "library at runtime." msgstr "" "Si vous encapsulez une bibliothèque partagée avec :mod:`ctypes`, il est " @@ -1648,8 +1638,8 @@ msgstr "Chargement des bibliothèques partagées" #: library/ctypes.rst:1319 msgid "" -"There are several ways to load shared libraries into the Python process. " -"One way is to instantiate one of the following classes:" +"There are several ways to load shared libraries into the Python process. One " +"way is to instantiate one of the following classes:" msgstr "" "Il y a plusieurs moyens de charger une bibliothèque partagée dans un " "processus Python. L'un d'entre eux consiste à instancier une des classes " @@ -1657,9 +1647,9 @@ msgstr "" #: library/ctypes.rst:1325 msgid "" -"Instances of this class represent loaded shared libraries. Functions in " -"these libraries use the standard C calling convention, and are assumed to " -"return :c:type:`int`." +"Instances of this class represent loaded shared libraries. Functions in these " +"libraries use the standard C calling convention, and are assumed to return :c:" +"type:`int`." msgstr "" "Une instance de cette classe représente une bibliothèque partagée déjà " "chargée. Les fonctions de cette bibliothèque utilisent la convention d'appel " @@ -1668,22 +1658,22 @@ msgstr "" #: library/ctypes.rst:1329 msgid "" "On Windows creating a :class:`CDLL` instance may fail even if the DLL name " -"exists. When a dependent DLL of the loaded DLL is not found, a :exc:" -"`OSError` error is raised with the message *\"[WinError 126] The specified " -"module could not be found\".* This error message does not contain the name " -"of the missing DLL because the Windows API does not return this information " -"making this error hard to diagnose. To resolve this error and determine " -"which DLL is not found, you need to find the list of dependent DLLs and " -"determine which one is not found using Windows debugging and tracing tools." -msgstr "" -"En Windows, créer une instance de :class:`CDLL` peut échouer, même si une " -"DLL du bon nom existe. Quand une des dépendances de la DLL à charger ne peut " -"pas être trouvée, une :exc:`OSError` est levée avec le message *\"[WinError " -"126] The specified module could not be found\".* Ce message d'erreur ne " -"contient pas le nom de la DLL manquante car l'API Windows ne fournit pas " -"cette information. Cela rend l'erreur délicate à analyser ; pour la " -"résoudre, il faut lister toutes les dépendances de la DLL et trouver celle " -"qui manque en utilisant des outils de débogage et de traçage Windows." +"exists. When a dependent DLL of the loaded DLL is not found, a :exc:`OSError` " +"error is raised with the message *\"[WinError 126] The specified module could " +"not be found\".* This error message does not contain the name of the missing " +"DLL because the Windows API does not return this information making this " +"error hard to diagnose. To resolve this error and determine which DLL is not " +"found, you need to find the list of dependent DLLs and determine which one is " +"not found using Windows debugging and tracing tools." +msgstr "" +"En Windows, créer une instance de :class:`CDLL` peut échouer, même si une DLL " +"du bon nom existe. Quand une des dépendances de la DLL à charger ne peut pas " +"être trouvée, une :exc:`OSError` est levée avec le message *\"[WinError 126] " +"The specified module could not be found\".* Ce message d'erreur ne contient " +"pas le nom de la DLL manquante car l'API Windows ne fournit pas cette " +"information. Cela rend l'erreur délicate à analyser ; pour la résoudre, il " +"faut lister toutes les dépendances de la DLL et trouver celle qui manque en " +"utilisant des outils de débogage et de traçage Windows." #: library/ctypes.rst:1341 msgid "" @@ -1704,11 +1694,11 @@ msgid "" msgstr "" "En Windows seulement : une instance de cette classe représente une " "bibliothèque partagée déjà chargée. Les fonctions de cette bibliothèque " -"utilisent la convention d'appel *stdcall*, et doivent renvoyer un code :" -"class:`HRESULT` (propre à Windows). Les valeurs de :class:`HRESULT` " -"contiennent des informations précisant si l'appel de la fonction a échoué ou " -"s'il a réussi, ainsi qu'un code d'erreur supplémentaire. Si la valeur de " -"retour signale un échec, une :class:`OSError` est levée automatiquement." +"utilisent la convention d'appel *stdcall*, et doivent renvoyer un code :class:" +"`HRESULT` (propre à Windows). Les valeurs de :class:`HRESULT` contiennent des " +"informations précisant si l'appel de la fonction a échoué ou s'il a réussi, " +"ainsi qu'un code d'erreur supplémentaire. Si la valeur de retour signale un " +"échec, une :class:`OSError` est levée automatiquement." #: library/ctypes.rst:1354 msgid ":exc:`WindowsError` used to be raised." @@ -1732,8 +1722,8 @@ msgid "" "on this platform." msgstr "" "Sous Windows CE, seule la convention d'appel standard est utilisée. Pour des " -"raisons pratiques, :class:`WinDLL` et :class:`OleDLL` utilisent la " -"convention d'appel standard sur cette plate-forme." +"raisons pratiques, :class:`WinDLL` et :class:`OleDLL` utilisent la convention " +"d'appel standard sur cette plate-forme." #: library/ctypes.rst:1368 msgid "" @@ -1747,9 +1737,9 @@ msgstr "" #: library/ctypes.rst:1374 msgid "" "Instances of this class behave like :class:`CDLL` instances, except that the " -"Python GIL is *not* released during the function call, and after the " -"function execution the Python error flag is checked. If the error flag is " -"set, a Python exception is raised." +"Python GIL is *not* released during the function call, and after the function " +"execution the Python error flag is checked. If the error flag is set, a " +"Python exception is raised." msgstr "" "Cette classe est identique à :class:`CDLL`, à ceci près que le GIL n'est " "*pas* relâché pendant l'appel de la fonction, et, qu'au terme de l'appel, le " @@ -1764,14 +1754,14 @@ msgstr "" #: library/ctypes.rst:1381 msgid "" "All these classes can be instantiated by calling them with at least one " -"argument, the pathname of the shared library. If you have an existing " -"handle to an already loaded shared library, it can be passed as the " -"``handle`` named parameter, otherwise the underlying platforms ``dlopen`` or " -"``LoadLibrary`` function is used to load the library into the process, and " -"to get a handle to it." -msgstr "" -"Toutes ces classes peuvent être instanciées en les appelant avec le chemin " -"de la bibliothèque partagée comme unique argument. Il est aussi possible de " +"argument, the pathname of the shared library. If you have an existing handle " +"to an already loaded shared library, it can be passed as the ``handle`` named " +"parameter, otherwise the underlying platforms ``dlopen`` or ``LoadLibrary`` " +"function is used to load the library into the process, and to get a handle to " +"it." +msgstr "" +"Toutes ces classes peuvent être instanciées en les appelant avec le chemin de " +"la bibliothèque partagée comme unique argument. Il est aussi possible de " "passer un lien vers une bibliothèque déjà chargée en utilisant le paramètre " "``handle``. Sinon, les fonctions ``dlopen`` ou ``LoadLibrary`` de la plate-" "forme sous-jacente permettent de charger la bibliothèque dans le processus, " @@ -1781,22 +1771,21 @@ msgstr "" msgid "" "The *mode* parameter can be used to specify how the library is loaded. For " "details, consult the :manpage:`dlopen(3)` manpage. On Windows, *mode* is " -"ignored. On posix systems, RTLD_NOW is always added, and is not " -"configurable." +"ignored. On posix systems, RTLD_NOW is always added, and is not configurable." msgstr "" "Le mode de chargement de la bibliothèque est défini par le paramètre *mode*. " -"Pour plus de détails, référez-vous à l'entrée :manpage:`dlopen(3)` du " -"manuel. En Windows, *mode* est ignoré. Sur les systèmes POSIX, RTLD_NOW y " -"est toujours ajouté. Ceci n'est pas configurable." +"Pour plus de détails, référez-vous à l'entrée :manpage:`dlopen(3)` du manuel. " +"En Windows, *mode* est ignoré. Sur les systèmes POSIX, RTLD_NOW y est " +"toujours ajouté. Ceci n'est pas configurable." #: library/ctypes.rst:1393 msgid "" "The *use_errno* parameter, when set to true, enables a ctypes mechanism that " "allows accessing the system :data:`errno` error number in a safe way. :mod:" -"`ctypes` maintains a thread-local copy of the systems :data:`errno` " -"variable; if you call foreign functions created with ``use_errno=True`` then " -"the :data:`errno` value before the function call is swapped with the ctypes " -"private copy, the same happens immediately after the function call." +"`ctypes` maintains a thread-local copy of the systems :data:`errno` variable; " +"if you call foreign functions created with ``use_errno=True`` then the :data:" +"`errno` value before the function call is swapped with the ctypes private " +"copy, the same happens immediately after the function call." msgstr "" "Le paramètre *use_errno*, lorsque défini à vrai, active un mécanisme de " "*ctypes* qui permet d'accéder au numéro d'erreur :data:`errno` du système de " @@ -1808,9 +1797,9 @@ msgstr "" #: library/ctypes.rst:1400 msgid "" -"The function :func:`ctypes.get_errno` returns the value of the ctypes " -"private copy, and the function :func:`ctypes.set_errno` changes the ctypes " -"private copy to a new value and returns the former value." +"The function :func:`ctypes.get_errno` returns the value of the ctypes private " +"copy, and the function :func:`ctypes.set_errno` changes the ctypes private " +"copy to a new value and returns the former value." msgstr "" "La fonction :func:`ctypes.get_errno` renvoie la valeur de la copie privée de " "*ctypes*. La fonction :func:`ctypes.set_errno` affecte une nouvelle valeur à " @@ -1820,32 +1809,32 @@ msgstr "" msgid "" "The *use_last_error* parameter, when set to true, enables the same mechanism " "for the Windows error code which is managed by the :func:`GetLastError` and :" -"func:`SetLastError` Windows API functions; :func:`ctypes.get_last_error` " -"and :func:`ctypes.set_last_error` are used to request and change the ctypes " +"func:`SetLastError` Windows API functions; :func:`ctypes.get_last_error` and :" +"func:`ctypes.set_last_error` are used to request and change the ctypes " "private copy of the windows error code." msgstr "" -"Définir le paramètre *use_last_error* à vrai active le même mécanisme pour " -"le code d'erreur de Windows qui est géré par les fonctions :func:" -"`GetLastError` et :func:`SetLastError` de l'API Windows ; :func:`ctypes." -"get_last_error` et :func:`ctypes.set_last_error` servent à obtenir et " -"modifier la copie privée *ctypes* de ce code d'erreur." +"Définir le paramètre *use_last_error* à vrai active le même mécanisme pour le " +"code d'erreur de Windows qui est géré par les fonctions :func:`GetLastError` " +"et :func:`SetLastError` de l'API Windows ; :func:`ctypes.get_last_error` et :" +"func:`ctypes.set_last_error` servent à obtenir et modifier la copie privée " +"*ctypes* de ce code d'erreur." #: library/ctypes.rst:1410 msgid "" "The *winmode* parameter is used on Windows to specify how the library is " "loaded (since *mode* is ignored). It takes any value that is valid for the " "Win32 API ``LoadLibraryEx`` flags parameter. When omitted, the default is to " -"use the flags that result in the most secure DLL load to avoiding issues " -"such as DLL hijacking. Passing the full path to the DLL is the safest way to " +"use the flags that result in the most secure DLL load to avoiding issues such " +"as DLL hijacking. Passing the full path to the DLL is the safest way to " "ensure the correct library and dependencies are loaded." msgstr "" "Sous Windows, le paramètre *winmode* définit comment charger la bibliothèque " "(puisque *mode* est ignoré). Il accepte toute valeur compatible avec le " "drapeau ``LoadLibraryEx`` de l'API Win32. Lorsqu'il est omis, les drapeaux " "par défaut sont ceux qui chargent la DLL de la manière la plus sécurisée " -"possible, afin d'éviter des problèmes comme le détournement de DLL. Passer " -"le chemin complet à la DLL reste le moyen le plus sûr de s'assurer que la " -"bonne bibliothèque et les bonnes dépendances sont chargées." +"possible, afin d'éviter des problèmes comme le détournement de DLL. Passer le " +"chemin complet à la DLL reste le moyen le plus sûr de s'assurer que la bonne " +"bibliothèque et les bonnes dépendances sont chargées." #: library/ctypes.rst:1417 msgid "Added *winmode* parameter." @@ -1872,23 +1861,22 @@ msgid "" "The default mode which is used to load shared libraries. On OSX 10.3, this " "is *RTLD_GLOBAL*, otherwise it is the same as *RTLD_LOCAL*." msgstr "" -"Mode de chargement par défaut des bibliothèques partagées. Vaut " -"*RTLD_GLOBAL* sur OSX 10.3 et *RTLD_LOCAL* sur les autres systèmes " -"d'exploitation." +"Mode de chargement par défaut des bibliothèques partagées. Vaut *RTLD_GLOBAL* " +"sur OSX 10.3 et *RTLD_LOCAL* sur les autres systèmes d'exploitation." #: library/ctypes.rst:1441 msgid "" -"Instances of these classes have no public methods. Functions exported by " -"the shared library can be accessed as attributes or by index. Please note " -"that accessing the function through an attribute caches the result and " -"therefore accessing it repeatedly returns the same object each time. On the " -"other hand, accessing it through an index returns a new object each time::" +"Instances of these classes have no public methods. Functions exported by the " +"shared library can be accessed as attributes or by index. Please note that " +"accessing the function through an attribute caches the result and therefore " +"accessing it repeatedly returns the same object each time. On the other " +"hand, accessing it through an index returns a new object each time::" msgstr "" "Les instances de ces classes n'ont pas de méthodes publiques ; on accède aux " -"fonctions de la bibliothèque partagée par attribut ou par indiçage. Notez " -"que les résultats des accès par attribut sont mis en cache, et donc des " -"accès consécutifs renvoient à chaque fois le même objet. Accéder à une " -"fonction par indice renvoie cependant chaque fois un nouvel objet :" +"fonctions de la bibliothèque partagée par attribut ou par indiçage. Notez que " +"les résultats des accès par attribut sont mis en cache, et donc des accès " +"consécutifs renvoient à chaque fois le même objet. Accéder à une fonction par " +"indice renvoie cependant chaque fois un nouvel objet :" #: library/ctypes.rst:1454 msgid "" @@ -1967,8 +1955,8 @@ msgstr "Pour créer des instances de :class:`PyDLL`." #: library/ctypes.rst:1514 msgid "" -"For accessing the C Python api directly, a ready-to-use Python shared " -"library object is available:" +"For accessing the C Python api directly, a ready-to-use Python shared library " +"object is available:" msgstr "Il existe un moyen rapide d'accéder directement à l'API C Python :" #: library/ctypes.rst:1520 @@ -1994,9 +1982,9 @@ msgstr "" #: library/ctypes.rst:1527 msgid "" -"Loading a library through any of these objects raises an :ref:`auditing " -"event ` ``ctypes.dlopen`` with string argument ``name``, the name " -"used to load the library." +"Loading a library through any of these objects raises an :ref:`auditing event " +"` ``ctypes.dlopen`` with string argument ``name``, the name used to " +"load the library." msgstr "" "Charger une bibliothèque à l'aide d'un de ces objets avec en argument " "``name``, le nom de la bibliothèque (une chaîne de caractères), lève un :ref:" @@ -2112,32 +2100,32 @@ msgstr "" msgid "" "Assign a tuple of ctypes types to specify the argument types that the " "function accepts. Functions using the ``stdcall`` calling convention can " -"only be called with the same number of arguments as the length of this " -"tuple; functions using the C calling convention accept additional, " -"unspecified arguments as well." +"only be called with the same number of arguments as the length of this tuple; " +"functions using the C calling convention accept additional, unspecified " +"arguments as well." msgstr "" "Fait correspondre le type des arguments que la fonction accepte avec un *n*-" "uplet de types *ctypes*. Les fonctions qui utilisent la convention d'appel " "``stdcall`` ne peuvent être appelées qu'avec le même nombre d'arguments que " -"la taille du *n*-uplet mais les fonctions qui utilisent la convention " -"d'appel C acceptent aussi des arguments additionnels non-définis." +"la taille du *n*-uplet mais les fonctions qui utilisent la convention d'appel " +"C acceptent aussi des arguments additionnels non-définis." #: library/ctypes.rst:1585 msgid "" "When a foreign function is called, each actual argument is passed to the :" "meth:`from_param` class method of the items in the :attr:`argtypes` tuple, " -"this method allows adapting the actual argument to an object that the " -"foreign function accepts. For example, a :class:`c_char_p` item in the :" -"attr:`argtypes` tuple will convert a string passed as argument into a bytes " -"object using ctypes conversion rules." +"this method allows adapting the actual argument to an object that the foreign " +"function accepts. For example, a :class:`c_char_p` item in the :attr:" +"`argtypes` tuple will convert a string passed as argument into a bytes object " +"using ctypes conversion rules." msgstr "" "À l'appel d'une fonction externe, chaque argument est passé à la méthode de " "classe :meth:`from_param` de l'élément correspondant dans le *n*-uplet des :" "attr:`argtypes`. Cette méthode convertit l'argument initial en un objet que " "la fonction externe peut comprendre. Par exemple, un :class:`c_char_p` dans " "le *n*-uplet des :attr:`argtypes` va transformer la chaîne de caractères " -"passée en argument en un objet chaîne d'octets selon les règles de " -"conversion *ctypes*." +"passée en argument en un objet chaîne d'octets selon les règles de conversion " +"*ctypes*." #: library/ctypes.rst:1592 msgid "" @@ -2146,8 +2134,8 @@ msgid "" "usable as argument (integer, string, ctypes instance). This allows defining " "adapters that can adapt custom objects as function parameters." msgstr "" -"Nouveau : il est maintenant possible de mettre des objets qui ne sont pas " -"des types de *ctypes* dans les *argtypes*, mais ceux-ci doivent avoir une " +"Nouveau : il est maintenant possible de mettre des objets qui ne sont pas des " +"types de *ctypes* dans les *argtypes*, mais ceux-ci doivent avoir une " "méthode :meth:`from_param` renvoyant une valeur qui peut être utilisée comme " "un argument (entier, chaîne de caractères ou instance *ctypes*). Ceci permet " "de créer des adaptateurs qui convertissent des objets arbitraires en des " @@ -2175,18 +2163,16 @@ msgid "" "callable object to check or post process the results of several functions." msgstr "" "*func* est l'objet représentant la fonction externe elle-même. Cet accesseur " -"permet de réutiliser le même appelable pour vérifier le résultat de " -"plusieurs fonctions ou de faire des actions supplémentaires après leur " -"exécution." +"permet de réutiliser le même appelable pour vérifier le résultat de plusieurs " +"fonctions ou de faire des actions supplémentaires après leur exécution." #: library/ctypes.rst:1613 msgid "" "*arguments* is a tuple containing the parameters originally passed to the " "function call, this allows specializing the behavior on the arguments used." msgstr "" -"*arguments* est le *n*-uplet qui contient les paramètres initiaux passés à " -"la fonction, ceci permet de spécialiser le comportement des arguments " -"utilisés." +"*arguments* est le *n*-uplet qui contient les paramètres initiaux passés à la " +"fonction, ceci permet de spécialiser le comportement des arguments utilisés." #: library/ctypes.rst:1617 msgid "" @@ -2203,8 +2189,8 @@ msgid "" "This exception is raised when a foreign function call cannot convert one of " "the passed arguments." msgstr "" -"Exception levée quand un appel à la fonction externe ne peut pas convertir " -"un des arguments qu'elle a reçus." +"Exception levée quand un appel à la fonction externe ne peut pas convertir un " +"des arguments qu'elle a reçus." #: library/ctypes.rst:1628 msgid "" @@ -2217,14 +2203,14 @@ msgstr "" #: library/ctypes.rst:1630 msgid "" "On Windows, when a foreign function call raises a system exception (for " -"example, due to an access violation), it will be captured and replaced with " -"a suitable Python exception. Further, an auditing event ``ctypes." -"seh_exception`` with argument ``code`` will be raised, allowing an audit " -"hook to replace the exception with its own." +"example, due to an access violation), it will be captured and replaced with a " +"suitable Python exception. Further, an auditing event ``ctypes." +"seh_exception`` with argument ``code`` will be raised, allowing an audit hook " +"to replace the exception with its own." msgstr "" "En Windows, quand un appel à une fonction externe lève une exception système " -"(par exemple, une erreur de segmentation), celle-ci est interceptée pour " -"être remplacée par l'exception Python correspondante. De plus, un évènement " +"(par exemple, une erreur de segmentation), celle-ci est interceptée pour être " +"remplacée par l'exception Python correspondante. De plus, un évènement " "d'audit ``ctypes.seh_exception`` est levé avec ``code`` en argument, ce qui " "permet à un point d'entrée (*hook* en anglais) d'audit de remplacer " "l'exception par une des siennes." @@ -2263,14 +2249,14 @@ msgid "" "decorator factories, and as such, be applied to functions through the " "``@wrapper`` syntax. See :ref:`ctypes-callback-functions` for examples." msgstr "" -"Il est aussi possible de créer des fonctions externes en instancier des " +"Il est aussi possible de créer des fonctions externes en instanciant des " "prototypes de fonction. Les prototypes de fonction ressemblent beaucoup aux " "prototypes de fonctions en C ; ils décrivent une fonction (type de retour, " -"type des arguments, convention d'appel) sans préciser son implémentation. " -"Les fabriques de fonction prennent en entrée le type de retour désiré et le " -"type des arguments de la fonction, et peuvent êter utilisées comme des " -"décorateurs de fabrique et ainsi, s'appliquer à des fonctions avec la " -"syntaxe ``@wrapper``. Voir :`ctypes-callback-functions` pour des exemples." +"type des arguments, convention d'appel) sans préciser son implémentation. Les " +"fabriques de fonction prennent en entrée le type de retour et le type des " +"arguments de la fonction, et peuvent être utilisées comme des décorateurs-" +"fabrique et ainsi, s'appliquer à des fonctions avec la syntaxe " +"``@décorateur``. Voir :ref:`ctypes-callback-functions` pour des exemples." #: library/ctypes.rst:1657 msgid "" @@ -2280,6 +2266,11 @@ msgid "" "`errno` variable is exchanged with the real :data:`errno` value before and " "after the call; *use_last_error* does the same for the Windows error code." msgstr "" +"Renvoie un prototype de fonction qui crée des fonctions qui respectent la " +"convention d'appel standard C. Les fonctions libèreront le GIL lors de leur " +"exécution. Si *use_errno* est vrai, la copie privée *ctypes* de la variable " +"système :data:`errno` variable est échangée avec la vraie valeur de :data:" +"`errno` avant et après l'appel ; *use_last_error* a le même effet en Windows." #: library/ctypes.rst:1667 msgid "" @@ -2289,37 +2280,55 @@ msgid "" "the GIL during the call. *use_errno* and *use_last_error* have the same " "meaning as above." msgstr "" +"En Windows seuleument : renvoie un prototype de fonction qui crée des " +"fonctions qui respectent la convention d'appel standard ``stdcall``, sauf " +"sous WIndows CE où :func:`WINFUNCTYPE` équivaut à :func:`CFUNCTYPE`. Les " +"fonctions libèreront le GIL lors de leur exécution. *use_errno* et " +"*use_last_error* ont la même signification que ci-dessus." #: library/ctypes.rst:1676 msgid "" -"The returned function prototype creates functions that use the Python " -"calling convention. The function will *not* release the GIL during the call." +"The returned function prototype creates functions that use the Python calling " +"convention. The function will *not* release the GIL during the call." msgstr "" +"Renvoie un prototype de fonction qui crée des fonctions qui respectent la " +"convention d'appel Python. Les fonctions ne libèreront *pas* le GIL lors de " +"leur exécution." #: library/ctypes.rst:1679 msgid "" -"Function prototypes created by these factory functions can be instantiated " -"in different ways, depending on the type and number of the parameters in the " +"Function prototypes created by these factory functions can be instantiated in " +"different ways, depending on the type and number of the parameters in the " "call:" msgstr "" +"Il y a plusieurs façons d'instancier les prototypes de fonction créés par ces " +"fabriques, selon le type et le nombre de paramètres de l'appel :" #: library/ctypes.rst:1687 msgid "" "Returns a foreign function at the specified address which must be an integer." msgstr "" +"Renvoie une fonction externe sur l'adresse donnée sous la forme d'un entier." #: library/ctypes.rst:1694 msgid "" "Create a C callable function (a callback function) from a Python *callable*." msgstr "" +"Crée une fonction appelable depuis du C (une fonction de rappel) d'un " +"appelable Python." #: library/ctypes.rst:1701 msgid "" "Returns a foreign function exported by a shared library. *func_spec* must be " "a 2-tuple ``(name_or_ordinal, library)``. The first item is the name of the " -"exported function as string, or the ordinal of the exported function as " -"small integer. The second item is the shared library instance." +"exported function as string, or the ordinal of the exported function as small " +"integer. The second item is the shared library instance." msgstr "" +"Renvoie une fonction externe exposée par une bibliothèque partagée. " +"*func_spec* est un couple ``(nom_ou_index, bibliothèque)``. Le premier " +"élément est le nom de la fonction à passer comme une chaîne ou bien son " +"indice (dans la table des symboles) à passer comme un entier. Le second " +"élément est l'instance de la bibliothèque partagée." #: library/ctypes.rst:1711 msgid "" @@ -2328,6 +2337,11 @@ msgid "" "is name of the COM method. *iid* is an optional pointer to the interface " "identifier which is used in extended error reporting." msgstr "" +"Renvoie une fonction qui appelle une méthode COM. *vtbl_index* est l'indice " +"de la fonction dans la table virtuelle, un petit entier positif. *name* est " +"le nom de la méthode COM. *iid* est un pointeur optionnel vers " +"l'identificateur de plateforme, qui est utilisé dans la remontée d'erreurs " +"étendue." #: library/ctypes.rst:1716 msgid "" @@ -2335,28 +2349,39 @@ msgid "" "COM interface as first argument, in addition to those parameters that are " "specified in the :attr:`argtypes` tuple." msgstr "" +"Les méthodes COM ont une convention d'appel particulière : elles requièrent " +"de passer un pointeur vers l'interface COM en premier argument, en sus des " +"arguments passés dans le *n*-uplet :attr:`argtypes`." #: library/ctypes.rst:1720 msgid "" "The optional *paramflags* parameter creates foreign function wrappers with " "much more functionality than the features described above." msgstr "" +"Le paramètre optionnel *paramflags* crée une fabrique de fonction externes " +"avec des fonctionnalités supplémentaires par rapport à celles décrites ci-" +"dessus." #: library/ctypes.rst:1723 msgid "*paramflags* must be a tuple of the same length as :attr:`argtypes`." -msgstr "" +msgstr "*paramflags* est un *n*-uplet de la même taille que :attr:`argtypes`." #: library/ctypes.rst:1725 msgid "" "Each item in this tuple contains further information about a parameter, it " "must be a tuple containing one, two, or three items." msgstr "" +"Chaque élément de ce *n*-uplet contient des informations supplémentaires sur " +"un des paramètres. Ce doit être aussi un *n*-uplet, avec un, deux ou trois " +"éléments." #: library/ctypes.rst:1728 msgid "" "The first item is an integer containing a combination of direction flags for " "the parameter:" msgstr "" +"Le premier élément est un entier qui contient une combinaison de drapeaux qui " +"précisent le sens des paramètres (entrée ou sortie) :" #: library/ctypes.rst:1732 msgid "1" @@ -2364,7 +2389,7 @@ msgstr "1" #: library/ctypes.rst:1732 msgid "Specifies an input parameter to the function." -msgstr "" +msgstr "Paramètre d'entrée." #: library/ctypes.rst:1735 msgid "2" @@ -2372,7 +2397,7 @@ msgstr "2" #: library/ctypes.rst:1735 msgid "Output parameter. The foreign function fills in a value." -msgstr "" +msgstr "Paramètre de sortie. La fonction externe va modifier cette valeur." #: library/ctypes.rst:1738 msgid "4" @@ -2380,7 +2405,7 @@ msgstr "4" #: library/ctypes.rst:1738 msgid "Input parameter which defaults to the integer zero." -msgstr "" +msgstr "Paramètre d'entrée, valant 0 par défaut." #: library/ctypes.rst:1740 msgid "" @@ -2394,9 +2419,9 @@ msgstr "" #: library/ctypes.rst:1745 msgid "" -"This example demonstrates how to wrap the Windows ``MessageBoxW`` function " -"so that it supports default parameters and named arguments. The C " -"declaration from the windows header file is this::" +"This example demonstrates how to wrap the Windows ``MessageBoxW`` function so " +"that it supports default parameters and named arguments. The C declaration " +"from the windows header file is this::" msgstr "" #: library/ctypes.rst:1779 @@ -2409,10 +2434,9 @@ msgstr "" #: library/ctypes.rst:1770 msgid "" -"A second example demonstrates output parameters. The win32 " -"``GetWindowRect`` function retrieves the dimensions of a specified window by " -"copying them into ``RECT`` structure that the caller has to supply. Here is " -"the C declaration::" +"A second example demonstrates output parameters. The win32 ``GetWindowRect`` " +"function retrieves the dimensions of a specified window by copying them into " +"``RECT`` structure that the caller has to supply. Here is the C declaration::" msgstr "" #: library/ctypes.rst:1788 @@ -2453,8 +2477,8 @@ msgstr "" #: library/ctypes.rst:1832 msgid "" -"Raises an :ref:`auditing event ` ``ctypes.addressof`` with " -"argument ``obj``." +"Raises an :ref:`auditing event ` ``ctypes.addressof`` with argument " +"``obj``." msgstr "" #: library/ctypes.rst:1837 @@ -2476,16 +2500,16 @@ msgstr "" #: library/ctypes.rst:1851 msgid "" -"The returned object can only be used as a foreign function call parameter. " -"It behaves similar to ``pointer(obj)``, but the construction is a lot faster." +"The returned object can only be used as a foreign function call parameter. It " +"behaves similar to ``pointer(obj)``, but the construction is a lot faster." msgstr "" #: library/ctypes.rst:1857 msgid "" -"This function is similar to the cast operator in C. It returns a new " -"instance of *type* which points to the same memory block as *obj*. *type* " -"must be a pointer type, and *obj* must be an object that can be interpreted " -"as a pointer." +"This function is similar to the cast operator in C. It returns a new instance " +"of *type* which points to the same memory block as *obj*. *type* must be a " +"pointer type, and *obj* must be an object that can be interpreted as a " +"pointer." msgstr "" #: library/ctypes.rst:1865 @@ -2496,17 +2520,17 @@ msgstr "" #: library/ctypes.rst:1868 msgid "" -"*init_or_size* must be an integer which specifies the size of the array, or " -"a bytes object which will be used to initialize the array items." +"*init_or_size* must be an integer which specifies the size of the array, or a " +"bytes object which will be used to initialize the array items." msgstr "" #: library/ctypes.rst:1871 msgid "" -"If a bytes object is specified as first argument, the buffer is made one " -"item larger than its length so that the last element in the array is a NUL " +"If a bytes object is specified as first argument, the buffer is made one item " +"larger than its length so that the last element in the array is a NUL " "termination character. An integer can be passed as second argument which " -"allows specifying the size of the array if the length of the bytes should " -"not be used." +"allows specifying the size of the array if the length of the bytes should not " +"be used." msgstr "" #: library/ctypes.rst:1876 @@ -2517,21 +2541,21 @@ msgstr "" #: library/ctypes.rst:1881 msgid "" -"This function creates a mutable unicode character buffer. The returned " -"object is a ctypes array of :class:`c_wchar`." +"This function creates a mutable unicode character buffer. The returned object " +"is a ctypes array of :class:`c_wchar`." msgstr "" #: library/ctypes.rst:1884 msgid "" -"*init_or_size* must be an integer which specifies the size of the array, or " -"a string which will be used to initialize the array items." +"*init_or_size* must be an integer which specifies the size of the array, or a " +"string which will be used to initialize the array items." msgstr "" #: library/ctypes.rst:1887 msgid "" "If a string is specified as first argument, the buffer is made one item " -"larger than the length of the string so that the last element in the array " -"is a NUL termination character. An integer can be passed as second argument " +"larger than the length of the string so that the last element in the array is " +"a NUL termination character. An integer can be passed as second argument " "which allows specifying the size of the array if the length of the string " "should not be used." msgstr "" @@ -2545,8 +2569,8 @@ msgstr "" #: library/ctypes.rst:1898 msgid "" "Windows only: This function is a hook which allows implementing in-process " -"COM servers with ctypes. It is called from the DllCanUnloadNow function " -"that the _ctypes extension dll exports." +"COM servers with ctypes. It is called from the DllCanUnloadNow function that " +"the _ctypes extension dll exports." msgstr "" #: library/ctypes.rst:1905 @@ -2560,8 +2584,8 @@ msgstr "" msgid "" "Try to find a library and return a pathname. *name* is the library name " "without any prefix like ``lib``, suffix like ``.so``, ``.dylib`` or version " -"number (this is the form used for the posix linker option :option:`!-l`). " -"If no library can be found, returns ``None``." +"number (this is the form used for the posix linker option :option:`!-l`). If " +"no library can be found, returns ``None``." msgstr "" #: library/ctypes.rst:1924 @@ -2619,8 +2643,8 @@ msgstr "" #: library/ctypes.rst:1962 msgid "" "Same as the standard C memmove library function: copies *count* bytes from " -"*src* to *dst*. *dst* and *src* must be integers or ctypes instances that " -"can be converted to pointers." +"*src* to *dst*. *dst* and *src* must be integers or ctypes instances that can " +"be converted to pointers." msgstr "" #: library/ctypes.rst:1969 @@ -2639,8 +2663,8 @@ msgstr "" #: library/ctypes.rst:1983 msgid "" -"This function creates a new pointer instance, pointing to *obj*. The " -"returned object is of the type ``POINTER(type(obj))``." +"This function creates a new pointer instance, pointing to *obj*. The returned " +"object is of the type ``POINTER(type(obj))``." msgstr "" #: library/ctypes.rst:1986 @@ -2665,15 +2689,15 @@ msgstr "" #: library/ctypes.rst:2003 msgid "" -"Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " -"argument ``errno``." +"Raises an :ref:`auditing event ` ``ctypes.set_errno`` with argument " +"``errno``." msgstr "" #: library/ctypes.rst:2008 msgid "" -"Windows only: set the current value of the ctypes-private copy of the " -"system :data:`LastError` variable in the calling thread to *value* and " -"return the previous value." +"Windows only: set the current value of the ctypes-private copy of the system :" +"data:`LastError` variable in the calling thread to *value* and return the " +"previous value." msgstr "" #: library/ctypes.rst:2012 @@ -2704,10 +2728,9 @@ msgstr "" #: library/ctypes.rst:2032 msgid "" "Windows only: this function is probably the worst-named thing in ctypes. It " -"creates an instance of OSError. If *code* is not specified, " -"``GetLastError`` is called to determine the error code. If *descr* is not " -"specified, :func:`FormatError` is called to get a textual description of the " -"error." +"creates an instance of OSError. If *code* is not specified, ``GetLastError`` " +"is called to determine the error code. If *descr* is not specified, :func:" +"`FormatError` is called to get a textual description of the error." msgstr "" #: library/ctypes.rst:2038 @@ -2752,9 +2775,9 @@ msgstr "" msgid "" "This method returns a ctypes instance that shares the buffer of the *source* " "object. The *source* object must support the writeable buffer interface. " -"The optional *offset* parameter specifies an offset into the source buffer " -"in bytes; the default is zero. If the source buffer is not large enough a :" -"exc:`ValueError` is raised." +"The optional *offset* parameter specifies an offset into the source buffer in " +"bytes; the default is zero. If the source buffer is not large enough a :exc:" +"`ValueError` is raised." msgstr "" #: library/ctypes.rst:2088 @@ -2767,8 +2790,8 @@ msgstr "" msgid "" "This method creates a ctypes instance, copying the buffer from the *source* " "object buffer which must be readable. The optional *offset* parameter " -"specifies an offset into the source buffer in bytes; the default is zero. " -"If the source buffer is not large enough a :exc:`ValueError` is raised." +"specifies an offset into the source buffer in bytes; the default is zero. If " +"the source buffer is not large enough a :exc:`ValueError` is raised." msgstr "" #: library/ctypes.rst:2092 @@ -2800,8 +2823,8 @@ msgstr "" #: library/ctypes.rst:2108 msgid "" "All ctypes data types have a default implementation of this classmethod that " -"normally returns *obj* if that is an instance of the type. Some types " -"accept other objects as well." +"normally returns *obj* if that is an instance of the type. Some types accept " +"other objects as well." msgstr "" #: library/ctypes.rst:2114 @@ -2831,19 +2854,19 @@ msgstr "" #: library/ctypes.rst:2134 msgid "" -"This member is either ``None`` or a dictionary containing Python objects " -"that need to be kept alive so that the memory block contents is kept valid. " -"This object is only exposed for debugging; never modify the contents of this " +"This member is either ``None`` or a dictionary containing Python objects that " +"need to be kept alive so that the memory block contents is kept valid. This " +"object is only exposed for debugging; never modify the contents of this " "dictionary." msgstr "" #: library/ctypes.rst:2147 msgid "" -"This non-public class is the base class of all fundamental ctypes data " -"types. It is mentioned here because it contains the common attributes of the " -"fundamental ctypes data types. :class:`_SimpleCData` is a subclass of :" -"class:`_CData`, so it inherits their methods and attributes. ctypes data " -"types that are not and do not contain pointers can now be pickled." +"This non-public class is the base class of all fundamental ctypes data types. " +"It is mentioned here because it contains the common attributes of the " +"fundamental ctypes data types. :class:`_SimpleCData` is a subclass of :class:" +"`_CData`, so it inherits their methods and attributes. ctypes data types that " +"are not and do not contain pointers can now be pickled." msgstr "" #: library/ctypes.rst:2153 @@ -2862,23 +2885,23 @@ msgstr "" msgid "" "When the ``value`` attribute is retrieved from a ctypes instance, usually a " "new object is returned each time. :mod:`ctypes` does *not* implement " -"original object return, always a new object is constructed. The same is " -"true for all other ctypes object instances." +"original object return, always a new object is constructed. The same is true " +"for all other ctypes object instances." msgstr "" #: library/ctypes.rst:2168 msgid "" "Fundamental data types, when returned as foreign function call results, or, " "for example, by retrieving structure field members or array items, are " -"transparently converted to native Python types. In other words, if a " -"foreign function has a :attr:`restype` of :class:`c_char_p`, you will always " -"receive a Python bytes object, *not* a :class:`c_char_p` instance." +"transparently converted to native Python types. In other words, if a foreign " +"function has a :attr:`restype` of :class:`c_char_p`, you will always receive " +"a Python bytes object, *not* a :class:`c_char_p` instance." msgstr "" #: library/ctypes.rst:2176 msgid "" -"Subclasses of fundamental data types do *not* inherit this behavior. So, if " -"a foreign functions :attr:`restype` is a subclass of :class:`c_void_p`, you " +"Subclasses of fundamental data types do *not* inherit this behavior. So, if a " +"foreign functions :attr:`restype` is a subclass of :class:`c_void_p`, you " "will receive an instance of this subclass from the function call. Of course, " "you can get the value of the pointer by accessing the ``value`` attribute." msgstr "" @@ -2943,20 +2966,20 @@ msgstr "" #: library/ctypes.rst:2238 msgid "" -"Represents the C 16-bit :c:type:`signed int` datatype. Usually an alias " -"for :class:`c_short`." +"Represents the C 16-bit :c:type:`signed int` datatype. Usually an alias for :" +"class:`c_short`." msgstr "" #: library/ctypes.rst:2244 msgid "" -"Represents the C 32-bit :c:type:`signed int` datatype. Usually an alias " -"for :class:`c_int`." +"Represents the C 32-bit :c:type:`signed int` datatype. Usually an alias for :" +"class:`c_int`." msgstr "" #: library/ctypes.rst:2250 msgid "" -"Represents the C 64-bit :c:type:`signed int` datatype. Usually an alias " -"for :class:`c_longlong`." +"Represents the C 64-bit :c:type:`signed int` datatype. Usually an alias for :" +"class:`c_longlong`." msgstr "" #: library/ctypes.rst:2256 @@ -2973,8 +2996,8 @@ msgstr "" #: library/ctypes.rst:2268 msgid "" -"Represents the C :c:type:`signed short` datatype. The constructor accepts " -"an optional integer initializer; no overflow checking is done." +"Represents the C :c:type:`signed short` datatype. The constructor accepts an " +"optional integer initializer; no overflow checking is done." msgstr "" #: library/ctypes.rst:2274 @@ -2987,15 +3010,15 @@ msgstr "" #: library/ctypes.rst:2286 msgid "" -"Represents the C :c:type:`unsigned char` datatype, it interprets the value " -"as small integer. The constructor accepts an optional integer initializer; " -"no overflow checking is done." +"Represents the C :c:type:`unsigned char` datatype, it interprets the value as " +"small integer. The constructor accepts an optional integer initializer; no " +"overflow checking is done." msgstr "" #: library/ctypes.rst:2293 msgid "" -"Represents the C :c:type:`unsigned int` datatype. The constructor accepts " -"an optional integer initializer; no overflow checking is done. On platforms " +"Represents the C :c:type:`unsigned int` datatype. The constructor accepts an " +"optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias for :class:`c_ulong`." msgstr "" @@ -3043,8 +3066,8 @@ msgstr "" #: library/ctypes.rst:2342 msgid "" -"Represents the C :c:type:`void *` type. The value is represented as " -"integer. The constructor accepts an optional integer initializer." +"Represents the C :c:type:`void *` type. The value is represented as integer. " +"The constructor accepts an optional integer initializer." msgstr "" #: library/ctypes.rst:2348 @@ -3070,8 +3093,8 @@ msgstr "" #: library/ctypes.rst:2369 msgid "" -"Windows only: Represents a :c:type:`HRESULT` value, which contains success " -"or error information for a function or method call." +"Windows only: Represents a :c:type:`HRESULT` value, which contains success or " +"error information for a function or method call." msgstr "" #: library/ctypes.rst:2375 @@ -3151,10 +3174,10 @@ msgstr "" #: library/ctypes.rst:2440 msgid "" -"The :attr:`_fields_` class variable must, however, be defined before the " -"type is first used (an instance is created, :func:`sizeof` is called on it, " -"and so on). Later assignments to the :attr:`_fields_` class variable will " -"raise an AttributeError." +"The :attr:`_fields_` class variable must, however, be defined before the type " +"is first used (an instance is created, :func:`sizeof` is called on it, and so " +"on). Later assignments to the :attr:`_fields_` class variable will raise an " +"AttributeError." msgstr "" #: library/ctypes.rst:2445 @@ -3174,8 +3197,8 @@ msgstr "" #: library/ctypes.rst:2459 msgid "" "An optional sequence that lists the names of unnamed (anonymous) fields. :" -"attr:`_anonymous_` must be already defined when :attr:`_fields_` is " -"assigned, otherwise it will have no effect." +"attr:`_anonymous_` must be already defined when :attr:`_fields_` is assigned, " +"otherwise it will have no effect." msgstr "" #: library/ctypes.rst:2463 @@ -3194,8 +3217,8 @@ msgstr "" msgid "" "The ``TYPEDESC`` structure describes a COM data type, the ``vt`` field " "specifies which one of the union fields is valid. Since the ``u`` field is " -"defined as anonymous field, it is now possible to access the members " -"directly off the TYPEDESC instance. ``td.lptdesc`` and ``td.u.lptdesc`` are " +"defined as anonymous field, it is now possible to access the members directly " +"off the TYPEDESC instance. ``td.lptdesc`` and ``td.u.lptdesc`` are " "equivalent, but the former is faster since it does not need to create a " "temporary union instance::" msgstr "" @@ -3228,12 +3251,12 @@ msgstr "Classe de base abstraite pour les *arrays*." #: library/ctypes.rst:2515 msgid "" -"The recommended way to create concrete array types is by multiplying any :" -"mod:`ctypes` data type with a positive integer. Alternatively, you can " -"subclass this type and define :attr:`_length_` and :attr:`_type_` class " -"variables. Array elements can be read and written using standard subscript " -"and slice accesses; for slice reads, the resulting object is *not* itself " -"an :class:`Array`." +"The recommended way to create concrete array types is by multiplying any :mod:" +"`ctypes` data type with a positive integer. Alternatively, you can subclass " +"this type and define :attr:`_length_` and :attr:`_type_` class variables. " +"Array elements can be read and written using standard subscript and slice " +"accesses; for slice reads, the resulting object is *not* itself an :class:" +"`Array`." msgstr "" #: library/ctypes.rst:2525 From 478783426db292e2b44e160ba4885f1510376679 Mon Sep 17 00:00:00 2001 From: awecx Date: Mon, 1 Nov 2021 17:13:35 +0100 Subject: [PATCH 3/7] Fini. --- library/ctypes.po | 968 ++++++++++++++++++++++++---------------------- 1 file changed, 507 insertions(+), 461 deletions(-) diff --git a/library/ctypes.po b/library/ctypes.po index 1b84e63f6..380c8709b 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-09-23 16:16+0200\n" -"PO-Revision-Date: 2021-10-31 19:07+0100\n" +"PO-Revision-Date: 2021-11-01 17:12+0100\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -27,9 +27,9 @@ msgid "" msgstr "" ":mod:`ctypes` est une bibliothèque d'appel à des fonctions externes en " "python. Elle fournit des types de données compatibles avec le langage C et " -"permet d'appeler des fonctions depuis des DLL ou des bibliothèques partagées, " -"rendant ainsi possible l'interfaçage de ces bibliothèques avec du pur code " -"Python." +"permet d'appeler des fonctions depuis des DLL ou des bibliothèques " +"partagées, rendant ainsi possible l'interfaçage de ces bibliothèques avec du " +"pur code Python." #: library/ctypes.rst:19 msgid "ctypes tutorial" @@ -50,14 +50,14 @@ msgstr "" msgid "" "Note: Some code samples reference the ctypes :class:`c_int` type. On " "platforms where ``sizeof(long) == sizeof(int)`` it is an alias to :class:" -"`c_long`. So, you should not be confused if :class:`c_long` is printed if you " -"would expect :class:`c_int` --- they are actually the same type." +"`c_long`. So, you should not be confused if :class:`c_long` is printed if " +"you would expect :class:`c_int` --- they are actually the same type." msgstr "" "Remarque : le type :class:`c_int` du module apparaît dans certains de ces " "exemples. Sur les plates-formes où ``sizeof(long) == sizeof(int)``, ce type " -"est un alias de :class:`c_long`. Ne soyez donc pas surpris si :class:`c_long` " -"s'affiche là où vous vous attendiez à :class:`c_int` — il s'agit bien du même " -"type." +"est un alias de :class:`c_long`. Ne soyez donc pas surpris si :class:" +"`c_long` s'affiche là où vous vous attendiez à :class:`c_int` — il s'agit " +"bien du même type." #: library/ctypes.rst:33 msgid "Loading dynamic link libraries" @@ -86,9 +86,9 @@ msgstr "" "convention d'appel standard ``cdecl``, alors que les bibliothèques qui se " "chargent avec *windll* utilisent la convention d'appel ``stdcall``. *oledll* " "utilise elle aussi la convention ``stdcall`` et suppose que les fonctions " -"renvoient un code d'erreur :c:type:`HRESULT` de Windows. Ce code d'erreur est " -"utilisé pour lever automatiquement une :class:`OSError` quand l'appel de la " -"fonction échoue." +"renvoient un code d'erreur :c:type:`HRESULT` de Windows. Ce code d'erreur " +"est utilisé pour lever automatiquement une :class:`OSError` quand l'appel de " +"la fonction échoue." #: library/ctypes.rst:46 msgid "" @@ -100,12 +100,12 @@ msgstr "" #: library/ctypes.rst:51 msgid "" -"Here are some examples for Windows. Note that ``msvcrt`` is the MS standard C " -"library containing most standard C functions, and uses the cdecl calling " +"Here are some examples for Windows. Note that ``msvcrt`` is the MS standard " +"C library containing most standard C functions, and uses the cdecl calling " "convention::" msgstr "" -"Voici quelques exemples Windows. ``msvcrt`` est la bibliothèque standard C de " -"Microsoft qui contient la plupart des fonctions standards C. Elle suit la " +"Voici quelques exemples Windows. ``msvcrt`` est la bibliothèque standard C " +"de Microsoft qui contient la plupart des fonctions standards C. Elle suit la " "convention d'appel *cdecl* ::" #: library/ctypes.rst:63 @@ -114,10 +114,10 @@ msgstr "Windows ajoute le suffixe habituel ``.dll`` automatiquement." #: library/ctypes.rst:66 msgid "" -"Accessing the standard C library through ``cdll.msvcrt`` will use an outdated " -"version of the library that may be incompatible with the one being used by " -"Python. Where possible, use native Python functionality, or else import and " -"use the ``msvcrt`` module." +"Accessing the standard C library through ``cdll.msvcrt`` will use an " +"outdated version of the library that may be incompatible with the one being " +"used by Python. Where possible, use native Python functionality, or else " +"import and use the ``msvcrt`` module." msgstr "" "Accéder à la bibliothèque standard C par ``cdll.msvcrt`` utilise une version " "obsolète de la bibliothèque qui peut avoir des problèmes de compatibilité " @@ -127,10 +127,10 @@ msgstr "" #: library/ctypes.rst:71 msgid "" -"On Linux, it is required to specify the filename *including* the extension to " -"load a library, so attribute access can not be used to load libraries. Either " -"the :meth:`LoadLibrary` method of the dll loaders should be used, or you " -"should load the library by creating an instance of CDLL by calling the " +"On Linux, it is required to specify the filename *including* the extension " +"to load a library, so attribute access can not be used to load libraries. " +"Either the :meth:`LoadLibrary` method of the dll loaders should be used, or " +"you should load the library by creating an instance of CDLL by calling the " "constructor::" msgstr "" "Pour charger une bibliothèque en Linux, il faut passer le nom du fichier " @@ -161,8 +161,8 @@ msgstr "" "souvent une version ANSI et une version UNICODE d'une fonction. La version " "UNICODE est exportée avec un ``W`` à la fin, et la version ANSI avec un " "``A``. La fonction *win32* ``GetModuleHandle``, qui renvoie un *gestionnaire " -"de module* à partir de son nom, a le prototype C suivant (c'est une macro qui " -"décide d'exporter l'une ou l'autre à travers ``GetModuleHandle``, selon " +"de module* à partir de son nom, a le prototype C suivant (c'est une macro " +"qui décide d'exporter l'une ou l'autre à travers ``GetModuleHandle``, selon " "qu'UNICODE est définie ou non) ::" #: library/ctypes.rst:119 @@ -172,9 +172,9 @@ msgid "" "explicitly, and then call it with bytes or string objects respectively." msgstr "" "*windll* n'en choisit pas une par magie, il faut accéder à la bonne en " -"écrivant explicitement ``GetModuleHandleA`` ou ``GetModuleHandleW`` et en les " -"appelant ensuite avec des objets octets ou avec des chaînes de caractères, " -"respectivement." +"écrivant explicitement ``GetModuleHandleA`` ou ``GetModuleHandleW`` et en " +"les appelant ensuite avec des objets octets ou avec des chaînes de " +"caractères, respectivement." #: library/ctypes.rst:123 msgid "" @@ -183,13 +183,14 @@ msgid "" "`getattr` to retrieve the function::" msgstr "" "Les DLL exportent parfois des fonctions dont les noms ne sont pas des " -"identifiants Python valides, comme ``\"??2@YAPAXI@Z\"``. Dans ce cas, il faut " -"utiliser :func:`getattr` pour accéder à la fonction ::" +"identifiants Python valides, comme ``\"??2@YAPAXI@Z\"``. Dans ce cas, il " +"faut utiliser :func:`getattr` pour accéder à la fonction ::" #: library/ctypes.rst:131 msgid "" "On Windows, some dlls export functions not by name but by ordinal. These " -"functions can be accessed by indexing the dll object with the ordinal number::" +"functions can be accessed by indexing the dll object with the ordinal " +"number::" msgstr "" "Sous Windows, certaines DLL exportent des fonctions à travers un indice " "plutôt qu'à travers un nom. On accède à une fonction en indiçant l'objet DLL " @@ -213,8 +214,8 @@ msgstr "" #: library/ctypes.rst:155 msgid "" -"This example calls both functions with a ``NULL`` pointer (``None`` should be " -"used as the ``NULL`` pointer)::" +"This example calls both functions with a ``NULL`` pointer (``None`` should " +"be used as the ``NULL`` pointer)::" msgstr "" "Cet exemple appelle les deux fonctions avec un pointeur ``NULL`` (on utilise " "``None`` pour passer un pointeur ``NULL``) ::" @@ -229,23 +230,23 @@ msgstr "" #: library/ctypes.rst:179 msgid "" -"To find out the correct calling convention you have to look into the C header " -"file or the documentation for the function you want to call." +"To find out the correct calling convention you have to look into the C " +"header file or the documentation for the function you want to call." msgstr "" "Pour déterminer la convention d'appel, il faut consulter l'en-tête C ou la " "documentation de la fonction à appeler." #: library/ctypes.rst:182 msgid "" -"On Windows, :mod:`ctypes` uses win32 structured exception handling to prevent " -"crashes from general protection faults when functions are called with invalid " -"argument values::" +"On Windows, :mod:`ctypes` uses win32 structured exception handling to " +"prevent crashes from general protection faults when functions are called " +"with invalid argument values::" msgstr "" -"En Windows, :mod:`ctypes` tire profit de la gestion structurée des exceptions " -"(*structured exception handling*) *win32* pour empêcher les plantages dus à " -"des interruptions, afin de préserver la protection globale (*general " -"protection faults*) du système, lorsque des fonctions sont appelées avec un " -"nombre incorrect d'arguments ::" +"En Windows, :mod:`ctypes` tire profit de la gestion structurée des " +"exceptions (*structured exception handling*) *win32* pour empêcher les " +"plantages dus à des interruptions, afin de préserver la protection globale " +"(*general protection faults*) du système, lorsque des fonctions sont " +"appelées avec un nombre incorrect d'arguments ::" #: library/ctypes.rst:192 msgid "" @@ -257,7 +258,8 @@ msgstr "" "Cependant, il y a suffisamment de façons de faire planter Python avec :mod:" "`ctypes`, donc il faut être prudent dans tous les cas. Le module :mod:" "`faulthandler` est pratique pour déboguer les plantages (p. ex. dus à des " -"erreurs de segmentation produites par des appels erronés à la bibliothèque C)." +"erreurs de segmentation produites par des appels erronés à la bibliothèque " +"C)." #: library/ctypes.rst:197 msgid "" @@ -266,8 +268,8 @@ msgid "" "calls. ``None`` is passed as a C ``NULL`` pointer, bytes objects and strings " "are passed as pointer to the memory block that contains their data (:c:type:" "`char *` or :c:type:`wchar_t *`). Python integers are passed as the " -"platforms default C :c:type:`int` type, their value is masked to fit into the " -"C type." +"platforms default C :c:type:`int` type, their value is masked to fit into " +"the C type." msgstr "" "``None``, les entiers, les objets octets et les chaînes de caractères " "(Unicode) sont les seuls types natifs de Python qui peuvent être directement " @@ -548,18 +550,18 @@ msgid "" msgstr "" "Cependant, prenez garde à ne pas en passer à des fonctions qui prennent en " "paramètre des pointeurs sur de la mémoire modifiable. S'il vous faut de la " -"mémoire modifiable, *ctypes* fournit la fonction :func:`create_string_buffer` " -"qui en crée de plusieurs façons. L'attribut ``raw`` permet d'accéder à (ou de " -"modifier) un bloc mémoire ; l'attribut ``value`` permet d'y accéder comme à " -"une chaîne de caractères terminée par NUL ::" +"mémoire modifiable, *ctypes* fournit la fonction :func:" +"`create_string_buffer` qui en crée de plusieurs façons. L'attribut ``raw`` " +"permet d'accéder à (ou de modifier) un bloc mémoire ; l'attribut ``value`` " +"permet d'y accéder comme à une chaîne de caractères terminée par NUL ::" #: library/ctypes.rst:333 msgid "" "The :func:`create_string_buffer` function replaces the :func:`c_buffer` " "function (which is still available as an alias), as well as the :func:" -"`c_string` function from earlier ctypes releases. To create a mutable memory " -"block containing unicode characters of the C type :c:type:`wchar_t` use the :" -"func:`create_unicode_buffer` function." +"`c_string` function from earlier ctypes releases. To create a mutable " +"memory block containing unicode characters of the C type :c:type:`wchar_t` " +"use the :func:`create_unicode_buffer` function." msgstr "" "La fonction :func:`create_string_buffer` remplace les fonctions :func:" "`c_buffer` (qui en reste un alias) et :func:`c_string` des versions " @@ -578,8 +580,8 @@ msgid "" "from within *IDLE* or *PythonWin*::" msgstr "" "*printf* utilise la vraie sortie standard, et non :data:`sys.stdout` ; les " -"exemples suivants ne fonctionnent donc que dans une invite de commande et non " -"depuis *IDLE* or *PythonWin* ::" +"exemples suivants ne fonctionnent donc que dans une invite de commande et " +"non depuis *IDLE* or *PythonWin* ::" #: library/ctypes.rst:365 msgid "" @@ -587,10 +589,10 @@ msgid "" "bytes objects have to be wrapped in their corresponding :mod:`ctypes` type, " "so that they can be converted to the required C data type::" msgstr "" -"Comme mentionné plus haut, tous les types Python (les entiers, les chaînes de " -"caractères et les objets octet exceptés) doivent être encapsulés dans leur " -"type :mod:`ctypes` correspondant pour pouvoir être convertis dans le type C " -"requis ::" +"Comme mentionné plus haut, tous les types Python (les entiers, les chaînes " +"de caractères et les objets octet exceptés) doivent être encapsulés dans " +"leur type :mod:`ctypes` correspondant pour pouvoir être convertis dans le " +"type C requis ::" #: library/ctypes.rst:378 msgid "Calling functions with your own custom data types" @@ -650,31 +652,31 @@ msgid "" "prototype for a C function), and tries to convert the arguments to valid " "types::" msgstr "" -"Définir un format empêche de passer des arguments de type incompatible (comme " -"le fait le prototype d'une fonction C) et tente de convertir les arguments en " -"des types valides ::" +"Définir un format empêche de passer des arguments de type incompatible " +"(comme le fait le prototype d'une fonction C) et tente de convertir les " +"arguments en des types valides ::" #: library/ctypes.rst:431 msgid "" "If you have defined your own classes which you pass to function calls, you " "have to implement a :meth:`from_param` class method for them to be able to " "use them in the :attr:`argtypes` sequence. The :meth:`from_param` class " -"method receives the Python object passed to the function call, it should do a " -"typecheck or whatever is needed to make sure this object is acceptable, and " -"then return the object itself, its :attr:`_as_parameter_` attribute, or " -"whatever you want to pass as the C function argument in this case. Again, the " -"result should be an integer, string, bytes, a :mod:`ctypes` instance, or an " -"object with an :attr:`_as_parameter_` attribute." +"method receives the Python object passed to the function call, it should do " +"a typecheck or whatever is needed to make sure this object is acceptable, " +"and then return the object itself, its :attr:`_as_parameter_` attribute, or " +"whatever you want to pass as the C function argument in this case. Again, " +"the result should be an integer, string, bytes, a :mod:`ctypes` instance, or " +"an object with an :attr:`_as_parameter_` attribute." msgstr "" "Pour appeler une fonction avec votre propre classe définie dans la séquence :" "attr:`argtypes`, il est nécessaire d'implémenter une méthode de classe :meth:" -"`from_param`. La méthode de classe :meth:`from_param` récupère l'objet Python " -"passé à la fonction et doit faire une vérification de type ou tout ce qui est " -"nécessaire pour s'assurer que l'objet est valide, puis renvoie l'objet lui-" -"même, son attribut :attr:`_as_parameter_`, ou tout ce que vous voulez passer " -"comme argument fonction C dans ce cas. Encore une fois, il convient que le " -"résultat soit un entier, une chaîne, des octets, une instance :mod:`ctypes` " -"ou un objet avec un attribut :attr:`_as_parameter_`." +"`from_param`. La méthode de classe :meth:`from_param` récupère l'objet " +"Python passé à la fonction et doit faire une vérification de type ou tout ce " +"qui est nécessaire pour s'assurer que l'objet est valide, puis renvoie " +"l'objet lui-même, son attribut :attr:`_as_parameter_`, ou tout ce que vous " +"voulez passer comme argument fonction C dans ce cas. Encore une fois, il " +"convient que le résultat soit un entier, une chaîne, des octets, une " +"instance :mod:`ctypes` ou un objet avec un attribut :attr:`_as_parameter_`." #: library/ctypes.rst:445 msgid "Return types" @@ -683,8 +685,8 @@ msgstr "Types de sortie" #: library/ctypes.rst:447 msgid "" "By default functions are assumed to return the C :c:type:`int` type. Other " -"return types can be specified by setting the :attr:`restype` attribute of the " -"function object." +"return types can be specified by setting the :attr:`restype` attribute of " +"the function object." msgstr "" "Le module suppose que toutes les fonctions renvoient par défaut un :c:type:" "`int` C. Pour préciser un autre type de sortie, il faut définir l'attribut :" @@ -696,14 +698,14 @@ msgid "" "expects a string pointer and a char, and returns a pointer to a string::" msgstr "" "Voici un exemple plus poussé. Celui-ci utilise la fonction ``strchr``, qui " -"prend en paramètres un pointeur vers une chaîne et un caractère. Elle renvoie " -"un pointeur sur une chaîne de caractères ::" +"prend en paramètres un pointeur vers une chaîne et un caractère. Elle " +"renvoie un pointeur sur une chaîne de caractères ::" #: library/ctypes.rst:464 msgid "" "If you want to avoid the ``ord(\"x\")`` calls above, you can set the :attr:" -"`argtypes` attribute, and the second argument will be converted from a single " -"character Python bytes object into a C char::" +"`argtypes` attribute, and the second argument will be converted from a " +"single character Python bytes object into a C char::" msgstr "" "Pour économiser l'appel ``ord(\"x\")``, il est possible de définir " "l'attribut :attr:`argtypes` ; le second argument, un objet octet à un seul " @@ -711,9 +713,9 @@ msgstr "" #: library/ctypes.rst:482 msgid "" -"You can also use a callable Python object (a function or a class for example) " -"as the :attr:`restype` attribute, if the foreign function returns an " -"integer. The callable will be called with the *integer* the C function " +"You can also use a callable Python object (a function or a class for " +"example) as the :attr:`restype` attribute, if the foreign function returns " +"an integer. The callable will be called with the *integer* the C function " "returns, and the result of this call will be used as the result of your " "function call. This is useful to check for error return values and " "automatically raise an exception::" @@ -727,16 +729,16 @@ msgstr "" #: library/ctypes.rst:505 msgid "" -"``WinError`` is a function which will call Windows ``FormatMessage()`` api to " -"get the string representation of an error code, and *returns* an exception. " -"``WinError`` takes an optional error code parameter, if no one is used, it " -"calls :func:`GetLastError` to retrieve it." +"``WinError`` is a function which will call Windows ``FormatMessage()`` api " +"to get the string representation of an error code, and *returns* an " +"exception. ``WinError`` takes an optional error code parameter, if no one is " +"used, it calls :func:`GetLastError` to retrieve it." msgstr "" "``WinError`` appelle l'API Windows ``FormatMessage()`` pour obtenir une " -"représentation de la chaîne de caractères qui correspond au code d'erreur, et " -"*renvoie* une exception. ``WinError`` prend en paramètre — optionnel — le " -"code d'erreur. Si celui-ci n'est pas passé, elle appelle :func:`GetLastError` " -"pour le récupérer." +"représentation de la chaîne de caractères qui correspond au code d'erreur, " +"et *renvoie* une exception. ``WinError`` prend en paramètre — optionnel — le " +"code d'erreur. Si celui-ci n'est pas passé, elle appelle :func:" +"`GetLastError` pour le récupérer." #: library/ctypes.rst:510 msgid "" @@ -768,12 +770,12 @@ msgid "" ":mod:`ctypes` exports the :func:`byref` function which is used to pass " "parameters by reference. The same effect can be achieved with the :func:" "`pointer` function, although :func:`pointer` does a lot more work since it " -"constructs a real pointer object, so it is faster to use :func:`byref` if you " -"don't need the pointer object in Python itself::" +"constructs a real pointer object, so it is faster to use :func:`byref` if " +"you don't need the pointer object in Python itself::" msgstr "" ":mod:`ctypes` contient la fonction :func:`byref` qui permet de passer des " -"paramètres par référence. La fonction :func:`pointer` a la même utilité, mais " -"fait plus de travail car :func:`pointer` construit un véritable objet " +"paramètres par référence. La fonction :func:`pointer` a la même utilité, " +"mais fait plus de travail car :func:`pointer` construit un véritable objet " "pointeur. Ainsi, si vous n'avez pas besoin de cet objet dans votre code " "Python, utiliser :func:`byref` est plus performant ::" @@ -791,12 +793,13 @@ msgstr "" "Les structures et les unions doivent hériter des classes de base :class:" "`Structure` et :class:`Union` définies dans le module :mod:`ctypes`. Chaque " "sous-classe doit définir un attribut :attr:`_fields_`. :attr:`_fields_` doit " -"être une liste de *paires*, contenant un *nom de champ* et un *type de champ*." +"être une liste de *paires*, contenant un *nom de champ* et un *type de " +"champ*." #: library/ctypes.rst:552 msgid "" -"The field type must be a :mod:`ctypes` type like :class:`c_int`, or any other " -"derived :mod:`ctypes` type: structure, union, array, pointer." +"The field type must be a :mod:`ctypes` type like :class:`c_int`, or any " +"other derived :mod:`ctypes` type: structure, union, array, pointer." msgstr "" "Le type de champ doit être un type :mod:`ctypes` comme :class:`c_int` ou un " "type :mod:`ctypes` dérivé : structure, union, tableau ou pointeur." @@ -830,7 +833,8 @@ msgstr "" #: library/ctypes.rst:592 msgid "" -"Nested structures can also be initialized in the constructor in several ways::" +"Nested structures can also be initialized in the constructor in several " +"ways::" msgstr "" "Une structure encapsulée peut être instanciée par un constructeur de " "plusieurs façons ::" @@ -840,16 +844,16 @@ msgid "" "Field :term:`descriptor`\\s can be retrieved from the *class*, they are " "useful for debugging because they can provide useful information::" msgstr "" -"Il est possible de récupérer les :term:`descripteurs ` des champs " -"depuis la *classe*. Ils sont importants pour déboguer car ils contiennent des " -"informations utiles ::" +"Il est possible de récupérer les :term:`descripteurs ` des " +"champs depuis la *classe*. Ils sont importants pour déboguer car ils " +"contiennent des informations utiles ::" #: library/ctypes.rst:611 msgid "" ":mod:`ctypes` does not support passing unions or structures with bit-fields " "to functions by value. While this may work on 32-bit x86, it's not " -"guaranteed by the library to work in the general case. Unions and structures " -"with bit-fields should always be passed to functions by pointer." +"guaranteed by the library to work in the general case. Unions and " +"structures with bit-fields should always be passed to functions by pointer." msgstr "" ":mod:`ctypes` ne prend pas en charge le passage par valeur des unions ou des " "structures avec des champs de bits. Bien que cela puisse fonctionner sur des " @@ -865,9 +869,9 @@ msgstr "Alignement et boutisme des structures et des unions" msgid "" "By default, Structure and Union fields are aligned in the same way the C " "compiler does it. It is possible to override this behavior by specifying a :" -"attr:`_pack_` class attribute in the subclass definition. This must be set to " -"a positive integer and specifies the maximum alignment for the fields. This " -"is what ``#pragma pack(n)`` also does in MSVC." +"attr:`_pack_` class attribute in the subclass definition. This must be set " +"to a positive integer and specifies the maximum alignment for the fields. " +"This is what ``#pragma pack(n)`` also does in MSVC." msgstr "" "Par défaut les champs d'une *Structure* ou d'une *Union* sont alignés de la " "même manière que le ferait un compilateur C. Ce comportement peut être " @@ -877,17 +881,17 @@ msgstr "" #: library/ctypes.rst:625 msgid "" -":mod:`ctypes` uses the native byte order for Structures and Unions. To build " -"structures with non-native byte order, you can use one of the :class:" +":mod:`ctypes` uses the native byte order for Structures and Unions. To " +"build structures with non-native byte order, you can use one of the :class:" "`BigEndianStructure`, :class:`LittleEndianStructure`, :class:" -"`BigEndianUnion`, and :class:`LittleEndianUnion` base classes. These classes " -"cannot contain pointer fields." +"`BigEndianUnion`, and :class:`LittleEndianUnion` base classes. These " +"classes cannot contain pointer fields." msgstr "" ":mod:`ctypes` suit le boutisme natif pour les *Structure* et les *Union*. " "Pour construire des structures avec un boutisme différent, utilisez les " -"classes de base :class:`BigEndianStructure`, :class:`LittleEndianStructure`, :" -"class:`BigEndianUnion` ou :class:`LittleEndianUnion`. Ces classes ne peuvent " -"pas avoir de champ pointeur." +"classes de base :class:`BigEndianStructure`, :class:" +"`LittleEndianStructure`, :class:`BigEndianUnion` ou :class:" +"`LittleEndianUnion`. Ces classes ne peuvent pas avoir de champ pointeur." #: library/ctypes.rst:635 msgid "Bit fields in structures and unions" @@ -899,9 +903,9 @@ msgid "" "fields are only possible for integer fields, the bit width is specified as " "the third item in the :attr:`_fields_` tuples::" msgstr "" -"Il est possible de créer des structures et des unions contenant des champs de " -"bits. Seuls les entiers peuvent être des champs de bits, le nombre de bits " -"est défini dans le troisième champ du *n*-uplet :attr:`_fields_` ::" +"Il est possible de créer des structures et des unions contenant des champs " +"de bits. Seuls les entiers peuvent être des champs de bits, le nombre de " +"bits est défini dans le troisième champ du *n*-uplet :attr:`_fields_` ::" #: library/ctypes.rst:655 msgid "Arrays" @@ -909,10 +913,11 @@ msgstr "Tableaux" #: library/ctypes.rst:657 msgid "" -"Arrays are sequences, containing a fixed number of instances of the same type." +"Arrays are sequences, containing a fixed number of instances of the same " +"type." msgstr "" -"Les tableaux sont des séquences qui contiennent un nombre fixe d'instances du " -"même type." +"Les tableaux sont des séquences qui contiennent un nombre fixe d'instances " +"du même type." #: library/ctypes.rst:659 msgid "" @@ -924,8 +929,8 @@ msgstr "" #: library/ctypes.rst:664 msgid "" -"Here is an example of a somewhat artificial data type, a structure containing " -"4 POINTs among other stuff::" +"Here is an example of a somewhat artificial data type, a structure " +"containing 4 POINTs among other stuff::" msgstr "" "Voici un exemple — un peu artificiel — d'une structure contenant, entre " "autres, 4 POINTs ::" @@ -936,8 +941,8 @@ msgstr "Comme d'habitude, on crée les instances en appelant la classe ::" #: library/ctypes.rst:686 msgid "" -"The above code print a series of ``0 0`` lines, because the array contents is " -"initialized to zeros." +"The above code print a series of ``0 0`` lines, because the array contents " +"is initialized to zeros." msgstr "" "Le code précédent affiche une suite de ``0 0`` car le contenu du tableau est " "initialisé avec des zéros." @@ -976,8 +981,9 @@ msgstr "" #: library/ctypes.rst:731 msgid "" -"Assigning another :class:`c_int` instance to the pointer's contents attribute " -"would cause the pointer to point to the memory location where this is stored::" +"Assigning another :class:`c_int` instance to the pointer's contents " +"attribute would cause the pointer to point to the memory location where this " +"is stored::" msgstr "" "Affecter une autre instance de :class:`c_int` à l'attribut *contents* du " "pointeur fait pointer le pointeur vers l'adresse mémoire de cette nouvelle " @@ -1002,8 +1008,8 @@ msgstr "" "Si vous êtes sûr de vous, vous pouvez utiliser d'autres valeurs que 0, comme " "en C : il est ainsi possible de modifier une zone mémoire de votre choix. De " "manière générale cette fonctionnalité ne s'utilise que sur un pointeur " -"renvoyé par une fonction C, pointeur que vous *savez* pointer vers un tableau " -"et non sur un seul élément." +"renvoyé par une fonction C, pointeur que vous *savez* pointer vers un " +"tableau et non sur un seul élément." #: library/ctypes.rst:764 msgid "" @@ -1012,10 +1018,10 @@ msgid "" "the :func:`POINTER` function, which accepts any :mod:`ctypes` type, and " "returns a new type::" msgstr "" -"Sous le capot, la fonction :func:`pointer` fait plus que simplement créer une " -"instance de pointeur ; elle doit d'abord créer un type « pointeur sur… ». " -"Cela s'effectue avec la fonction :func:`POINTER`, qui prend en paramètre " -"n'importe quel type :mod:`ctypes` et renvoie un nouveau type ::" +"Sous le capot, la fonction :func:`pointer` fait plus que simplement créer " +"une instance de pointeur ; elle doit d'abord créer un type « pointeur " +"sur… ». Cela s'effectue avec la fonction :func:`POINTER`, qui prend en " +"paramètre n'importe quel type :mod:`ctypes` et renvoie un nouveau type ::" #: library/ctypes.rst:780 msgid "" @@ -1043,10 +1049,10 @@ msgid "" "Usually, ctypes does strict type checking. This means, if you have " "``POINTER(c_int)`` in the :attr:`argtypes` list of a function or as the type " "of a member field in a structure definition, only instances of exactly the " -"same type are accepted. There are some exceptions to this rule, where ctypes " -"accepts other objects. For example, you can pass compatible array instances " -"instead of pointer types. So, for ``POINTER(c_int)``, ctypes accepts an " -"array of c_int::" +"same type are accepted. There are some exceptions to this rule, where " +"ctypes accepts other objects. For example, you can pass compatible array " +"instances instead of pointer types. So, for ``POINTER(c_int)``, ctypes " +"accepts an array of c_int::" msgstr "" "En général, *ctypes* respecte un typage fort. Cela signifie que si un " "``POINTER(c_int)`` est présent dans la liste des :attr:`argtypes` d'une " @@ -1079,16 +1085,17 @@ msgstr "" #: library/ctypes.rst:842 msgid "" "Sometimes you have instances of incompatible types. In C, you can cast one " -"type into another type. :mod:`ctypes` provides a :func:`cast` function which " -"can be used in the same way. The ``Bar`` structure defined above accepts " -"``POINTER(c_int)`` pointers or :class:`c_int` arrays for its ``values`` " -"field, but not instances of other types::" +"type into another type. :mod:`ctypes` provides a :func:`cast` function " +"which can be used in the same way. The ``Bar`` structure defined above " +"accepts ``POINTER(c_int)`` pointers or :class:`c_int` arrays for its " +"``values`` field, but not instances of other types::" msgstr "" "Parfois il faut gérer des incompatibilités entre les types. En C, il est " -"possible de convertir un type en un autre. :mod:`ctypes` fournit la fonction :" -"func:`cast` qui permet la même chose. La structure ``Bar`` ci-dessus accepte " -"des pointeurs ``POINTER(c_int)`` ou des tableaux de :class:`c_int` comme " -"valeur pour le champ ``values``, mais pas des instances d'autres types ::" +"possible de convertir un type en un autre. :mod:`ctypes` fournit la " +"fonction :func:`cast` qui permet la même chose. La structure ``Bar`` ci-" +"dessus accepte des pointeurs ``POINTER(c_int)`` ou des tableaux de :class:" +"`c_int` comme valeur pour le champ ``values``, mais pas des instances " +"d'autres types ::" #: library/ctypes.rst:854 msgid "For these cases, the :func:`cast` function is handy." @@ -1111,8 +1118,8 @@ msgstr "" #: library/ctypes.rst:867 msgid "" -"So, :func:`cast` can be used to assign to the ``values`` field of ``Bar`` the " -"structure::" +"So, :func:`cast` can be used to assign to the ``values`` field of ``Bar`` " +"the structure::" msgstr "" "Ainsi, la fonction :func:`cast` permet de remplir le champ ``values`` de la " "structure ``Bar`` ::" @@ -1123,8 +1130,8 @@ msgstr "Types incomplets" #: library/ctypes.rst:882 msgid "" -"*Incomplete Types* are structures, unions or arrays whose members are not yet " -"specified. In C, they are specified by forward declarations, which are " +"*Incomplete Types* are structures, unions or arrays whose members are not " +"yet specified. In C, they are specified by forward declarations, which are " "defined later::" msgstr "" "Un *type incomplet* est une structure, une union ou un tableau dont les " @@ -1151,8 +1158,8 @@ msgstr "" #: library/ctypes.rst:918 msgid "" -"Let's try it. We create two instances of ``cell``, and let them point to each " -"other, and finally follow the pointer chain a few times::" +"Let's try it. We create two instances of ``cell``, and let them point to " +"each other, and finally follow the pointer chain a few times::" msgstr "" "Essayons. Nous créons deux instances de ``cell``, les faisons pointer l'une " "sur l'autre et enfin nous suivons quelques maillons de la chaîne de " @@ -1172,9 +1179,9 @@ msgstr "" #: library/ctypes.rst:944 msgid "" -"First, you must create a class for the callback function. The class knows the " -"calling convention, the return type, and the number and types of arguments " -"this function will receive." +"First, you must create a class for the callback function. The class knows " +"the calling convention, the return type, and the number and types of " +"arguments this function will receive." msgstr "" "Tout d'abord, il faut créer une classe pour la fonction de rappel. La classe " "connaît la convention d'appel, le type de retour ainsi que le nombre et le " @@ -1195,8 +1202,8 @@ msgstr "" #: library/ctypes.rst:953 msgid "" "Both of these factory functions are called with the result type as first " -"argument, and the callback functions expected argument types as the remaining " -"arguments." +"argument, and the callback functions expected argument types as the " +"remaining arguments." msgstr "" "Le premier paramètre de ces deux fonctions est le type de retour, et les " "suivants sont les types des arguments qu'attend la fonction de rappel." @@ -1217,8 +1224,8 @@ msgid "" ":func:`qsort` must be called with a pointer to the data to sort, the number " "of items in the data array, the size of one item, and a pointer to the " "comparison function, the callback. The callback will then be called with two " -"pointers to items, and it must return a negative integer if the first item is " -"smaller than the second, a zero if they are equal, and a positive integer " +"pointers to items, and it must return a negative integer if the first item " +"is smaller than the second, a zero if they are equal, and a positive integer " "otherwise." msgstr "" ":func:`qsort` doit être appelée avec un pointeur vers la donnée à ordonner, " @@ -1273,19 +1280,19 @@ msgid "" "are used from C code. :mod:`ctypes` doesn't, and if you don't, they may be " "garbage collected, crashing your program when a callback is made." msgstr "" -"Prenez garde à bien conserver une référence à un objet :func:`CFUNCTYPE` tant " -"que celui-ci est utilisé par le code C. :mod:`ctypes` ne le fait pas tout " -"seul et, si vous ne le faites pas, le ramasse-miette pourrait les libérer, ce " -"qui fera planter votre programme quand un appel sera fait." +"Prenez garde à bien conserver une référence à un objet :func:`CFUNCTYPE` " +"tant que celui-ci est utilisé par le code C. :mod:`ctypes` ne le fait pas " +"tout seul et, si vous ne le faites pas, le ramasse-miette pourrait les " +"libérer, ce qui fera planter votre programme quand un appel sera fait." #: library/ctypes.rst:1043 msgid "" "Also, note that if the callback function is called in a thread created " "outside of Python's control (e.g. by the foreign code that calls the " -"callback), ctypes creates a new dummy Python thread on every invocation. This " -"behavior is correct for most purposes, but it means that values stored with :" -"class:`threading.local` will *not* survive across different callbacks, even " -"when those calls are made from the same C thread." +"callback), ctypes creates a new dummy Python thread on every invocation. " +"This behavior is correct for most purposes, but it means that values stored " +"with :class:`threading.local` will *not* survive across different callbacks, " +"even when those calls are made from the same C thread." msgstr "" "Notez aussi que si la fonction de rappel est appelée dans un fil d'exécution " "créé hors de Python (p. ex. par du code externe qui appelle la fonction de " @@ -1307,15 +1314,15 @@ msgid "" "flag given on startup." msgstr "" "Certaines bibliothèques ne se contentent pas d'exporter des fonctions, elles " -"exportent aussi des variables. Par exemple, la bibliothèque Python exporte :c:" -"data:`Py_OptimizeFlag`, un entier valant 0, 1, ou 2 selon que l'option :" +"exportent aussi des variables. Par exemple, la bibliothèque Python exporte :" +"c:data:`Py_OptimizeFlag`, un entier valant 0, 1, ou 2 selon que l'option :" "option:`-O` ou :option:`-OO` soit donnée au démarrage." #: library/ctypes.rst:1060 msgid "" ":mod:`ctypes` can access values like this with the :meth:`in_dll` class " -"methods of the type. *pythonapi* is a predefined symbol giving access to the " -"Python C api::" +"methods of the type. *pythonapi* is a predefined symbol giving access to " +"the Python C api::" msgstr "" ":mod:`ctypes` peut accéder à ce type de valeurs avec les méthodes de classe :" "meth:`in_dll` du type considéré. *pythonapi* est un symbole prédéfini qui " @@ -1332,8 +1339,8 @@ msgstr "" #: library/ctypes.rst:1073 msgid "" -"An extended example which also demonstrates the use of pointers accesses the :" -"c:data:`PyImport_FrozenModules` pointer exported by Python." +"An extended example which also demonstrates the use of pointers accesses " +"the :c:data:`PyImport_FrozenModules` pointer exported by Python." msgstr "" "Le pointeur :c:data:`PyImport_FrozenModules` exposé par Python est un autre " "exemple complet de l'utilisation de pointeurs." @@ -1351,19 +1358,19 @@ msgid "" "frozen modules." msgstr "" "Ce pointeur est initialisé de manière à pointer sur un tableau d'entrées de :" -"c:type:`struct _frozen`, dont tous les membres de la dernière valent ``NULL`` " -"ou zéro. Quand un module figé est importé, il est cherché dans ce tableau. Du " -"code tiers peut jouer avec pour construire dynamiquement une collection de " -"module figés." +"c:type:`struct _frozen`, dont tous les membres de la dernière valent " +"``NULL`` ou zéro. Quand un module figé est importé, il est cherché dans ce " +"tableau. Du code tiers peut jouer avec pour construire dynamiquement une " +"collection de module figés." #: library/ctypes.rst:1083 msgid "" -"So manipulating this pointer could even prove useful. To restrict the example " -"size, we show only how this table can be read with :mod:`ctypes`::" +"So manipulating this pointer could even prove useful. To restrict the " +"example size, we show only how this table can be read with :mod:`ctypes`::" msgstr "" -"Donc manipuler ce pointeur peut même se révéler utile. Pour limiter la taille " -"de l'exemple, nous nous bornons à montrer comment lire ce tableau avec :mod:" -"`ctypes` ::" +"Donc manipuler ce pointeur peut même se révéler utile. Pour limiter la " +"taille de l'exemple, nous nous bornons à montrer comment lire ce tableau " +"avec :mod:`ctypes` ::" #: library/ctypes.rst:1095 msgid "" @@ -1382,10 +1389,10 @@ msgid "" "the loop when we hit the ``NULL`` entry::" msgstr "" "Puisque ``table`` est un ``pointer`` vers un tableau d'entrées de " -"``struct_frozen``, il est possible d'itérer dessus, mais il faut être certain " -"que la boucle se termine, car les pointeurs n'ont pas de taille. Tôt ou tard, " -"il planterait probablement avec une erreur de segmentation ou autre, donc " -"mieux vaut sortir de la boucle quand on lit l'entrée ``NULL`` ::" +"``struct_frozen``, il est possible d'itérer dessus, mais il faut être " +"certain que la boucle se termine, car les pointeurs n'ont pas de taille. Tôt " +"ou tard, il planterait probablement avec une erreur de segmentation ou " +"autre, donc mieux vaut sortir de la boucle quand on lit l'entrée ``NULL`` ::" #: library/ctypes.rst:1120 msgid "" @@ -1393,9 +1400,9 @@ msgid "" "(indicated by the negative ``size`` member) is not well known, it is only " "used for testing. Try it out with ``import __hello__`` for example." msgstr "" -"Le fait que le standard Python possède un module et un paquet figés (indiqués " -"par la valeur négative du membre *size*) est peu connu, cela ne sert qu'aux " -"tests. Essayez avec ``import __hello__`` par exemple." +"Le fait que le standard Python possède un module et un paquet figés " +"(indiqués par la valeur négative du membre *size*) est peu connu, cela ne " +"sert qu'aux tests. Essayez avec ``import __hello__`` par exemple." #: library/ctypes.rst:1128 msgid "Surprises" @@ -1418,23 +1425,23 @@ msgid "" "Hm. We certainly expected the last statement to print ``3 4 1 2``. What " "happened? Here are the steps of the ``rc.a, rc.b = rc.b, rc.a`` line above::" msgstr "" -"Diantre. On s'attendait certainement à ce que le dernier résultat affiche ``3 " -"4 1 2``. Que s'est-il passé ? Les étapes de la ligne ``rc.a, rc.b = rc.b, rc." -"a`` ci-dessus sont les suivantes ::" +"Diantre. On s'attendait certainement à ce que le dernier résultat affiche " +"``3 4 1 2``. Que s'est-il passé ? Les étapes de la ligne ``rc.a, rc.b = rc." +"b, rc.a`` ci-dessus sont les suivantes ::" #: library/ctypes.rst:1161 msgid "" -"Note that ``temp0`` and ``temp1`` are objects still using the internal buffer " -"of the ``rc`` object above. So executing ``rc.a = temp0`` copies the buffer " -"contents of ``temp0`` into ``rc`` 's buffer. This, in turn, changes the " -"contents of ``temp1``. So, the last assignment ``rc.b = temp1``, doesn't have " -"the expected effect." +"Note that ``temp0`` and ``temp1`` are objects still using the internal " +"buffer of the ``rc`` object above. So executing ``rc.a = temp0`` copies the " +"buffer contents of ``temp0`` into ``rc`` 's buffer. This, in turn, changes " +"the contents of ``temp1``. So, the last assignment ``rc.b = temp1``, doesn't " +"have the expected effect." msgstr "" "Les objets ``temp0`` et ``temp1`` utilisent encore le tampon interne de " "l'objet ``rc`` ci-dessus. Donc exécuter ``rc.a = temp0`` copie le contenu du " "tampon de ``temp0`` dans celui de ``rc``. Ce qui, par ricochet, modifie le " -"contenu de ``temp1``. Et donc, la dernière affectation, ``rc.b = temp1``, n'a " -"pas l'effet escompté." +"contenu de ``temp1``. Et donc, la dernière affectation, ``rc.b = temp1``, " +"n'a pas l'effet escompté." #: library/ctypes.rst:1167 msgid "" @@ -1450,7 +1457,8 @@ msgstr "" msgid "" "Another example that may behave differently from what one would expect is " "this::" -msgstr "Un autre exemple de comportement *a priori* inattendu est le suivant ::" +msgstr "" +"Un autre exemple de comportement *a priori* inattendu est le suivant ::" #: library/ctypes.rst:1183 msgid "" @@ -1464,15 +1472,15 @@ msgstr "" msgid "" "Why is it printing ``False``? ctypes instances are objects containing a " "memory block plus some :term:`descriptor`\\s accessing the contents of the " -"memory. Storing a Python object in the memory block does not store the object " -"itself, instead the ``contents`` of the object is stored. Accessing the " -"contents again constructs a new Python object each time!" +"memory. Storing a Python object in the memory block does not store the " +"object itself, instead the ``contents`` of the object is stored. Accessing " +"the contents again constructs a new Python object each time!" msgstr "" -"Pourquoi cela affiche-t'il ``False`` ? Les instances *ctypes* sont des objets " -"qui contiennent un bloc mémoire et des :term:`descriptor` qui donnent accès " -"au contenu du ce bloc. Stocker un objet Python dans le bloc mémoire ne stocke " -"pas l'objet même ; seuls ses ``contents`` le sont. Accéder au ``contents`` " -"crée un nouvel objet Python à chaque fois !" +"Pourquoi cela affiche-t'il ``False`` ? Les instances *ctypes* sont des " +"objets qui contiennent un bloc mémoire et des :term:`descriptor` qui donnent " +"accès au contenu du ce bloc. Stocker un objet Python dans le bloc mémoire ne " +"stocke pas l'objet même ; seuls ses ``contents`` le sont. Accéder au " +"``contents`` crée un nouvel objet Python à chaque fois !" #: library/ctypes.rst:1196 msgid "Variable-sized data types" @@ -1488,16 +1496,17 @@ msgstr "" #: library/ctypes.rst:1200 msgid "" "The :func:`resize` function can be used to resize the memory buffer of an " -"existing ctypes object. The function takes the object as first argument, and " -"the requested size in bytes as the second argument. The memory block cannot " -"be made smaller than the natural memory block specified by the objects type, " -"a :exc:`ValueError` is raised if this is tried::" +"existing ctypes object. The function takes the object as first argument, " +"and the requested size in bytes as the second argument. The memory block " +"cannot be made smaller than the natural memory block specified by the " +"objects type, a :exc:`ValueError` is raised if this is tried::" msgstr "" "La fonction :func:`resize` permet de redimensionner la taille du tampon " "mémoire d'un objet *ctypes* existant. Cette fonction prend l'objet comme " "premier argument et la taille en octets désirée comme second. La taille du " "tampon mémoire ne peut pas être inférieure à celle occupée par un objet " -"unitaire du type considéré. Une :exc:`ValueError` est levée si c'est le cas ::" +"unitaire du type considéré. Une :exc:`ValueError` est levée si c'est le " +"cas ::" #: library/ctypes.rst:1220 msgid "" @@ -1511,14 +1520,14 @@ msgstr "" #: library/ctypes.rst:1232 msgid "" -"Another way to use variable-sized data types with :mod:`ctypes` is to use the " -"dynamic nature of Python, and (re-)define the data type after the required " -"size is already known, on a case by case basis." +"Another way to use variable-sized data types with :mod:`ctypes` is to use " +"the dynamic nature of Python, and (re-)define the data type after the " +"required size is already known, on a case by case basis." msgstr "" -"Une autre approche pour utiliser des types de donnée à taille flottante avec :" -"mod:`ctypes` consiste à tirer profit de la nature intrinsèquement dynamique " -"de Python et de (re)définir le type de donnée une fois que la taille demandée " -"est connue, au cas-par-cas." +"Une autre approche pour utiliser des types de donnée à taille flottante " +"avec :mod:`ctypes` consiste à tirer profit de la nature intrinsèquement " +"dynamique de Python et de (re)définir le type de donnée une fois que la " +"taille demandée est connue, au cas-par-cas." #: library/ctypes.rst:1240 msgid "ctypes reference" @@ -1541,12 +1550,12 @@ msgstr "" msgid "" "The purpose of the :func:`find_library` function is to locate a library in a " "way similar to what the compiler or runtime loader does (on platforms with " -"several versions of a shared library the most recent should be loaded), while " -"the ctypes library loaders act like when a program is run, and call the " -"runtime loader directly." +"several versions of a shared library the most recent should be loaded), " +"while the ctypes library loaders act like when a program is run, and call " +"the runtime loader directly." msgstr "" -"Le but de la fonction :func:`find_library` est de trouver une bibliothèque de " -"la même façon que le ferait le compilateur ou le chargeur (sur les plates-" +"Le but de la fonction :func:`find_library` est de trouver une bibliothèque " +"de la même façon que le ferait le compilateur ou le chargeur (sur les plates-" "formes avec plusieurs versions de la même bibliothèque, la plus récente est " "chargée), alors que les chargeurs de bibliothèques de *ctypes* se comportent " "de la même façon qu'un programme qui s'exécute, et appellent directement le " @@ -1554,8 +1563,8 @@ msgstr "" #: library/ctypes.rst:1257 msgid "" -"The :mod:`ctypes.util` module provides a function which can help to determine " -"the library to load." +"The :mod:`ctypes.util` module provides a function which can help to " +"determine the library to load." msgstr "" "Le module :mod:`ctypes.util` fournit une fonction pour déterminer quelle " "bibliothèque charger." @@ -1564,14 +1573,14 @@ msgstr "" msgid "" "Try to find a library and return a pathname. *name* is the library name " "without any prefix like *lib*, suffix like ``.so``, ``.dylib`` or version " -"number (this is the form used for the posix linker option :option:`!-l`). If " -"no library can be found, returns ``None``." +"number (this is the form used for the posix linker option :option:`!-l`). " +"If no library can be found, returns ``None``." msgstr "" "Tente de trouver une bibliothèque et en renvoie le chemin. *name* est le nom " "de la bibliothèque sans préfixe — comme *lib* — ni suffixe — comme ``.so``, " "``.dylib`` ou un numéro de version (c.-à-d. la même forme que l'option POSIX " -"de l'éditeur de lien :option:`!-l`). Si la fonction ne parvient pas à trouver " -"de bibliothèque, elle renvoie ``None``." +"de l'éditeur de lien :option:`!-l`). Si la fonction ne parvient pas à " +"trouver de bibliothèque, elle renvoie ``None``." #: library/ctypes.rst:1918 msgid "The exact functionality is system dependent." @@ -1583,14 +1592,15 @@ msgid "" "ldconfig``, ``gcc``, ``objdump`` and ``ld``) to find the library file. It " "returns the filename of the library file." msgstr "" -"Sous Linux, :func:`find_library` essaye de lancer des programmes externes (``/" -"sbin/ldconfig``, ``gcc``, ``objdump`` et ``ld``) pour trouver la " +"Sous Linux, :func:`find_library` essaye de lancer des programmes externes " +"(``/sbin/ldconfig``, ``gcc``, ``objdump`` et ``ld``) pour trouver la " "bibliothèque. Elle renvoie le nom de la bibliothèque sur le disque." #: library/ctypes.rst:1276 msgid "" "On Linux, the value of the environment variable ``LD_LIBRARY_PATH`` is used " -"when searching for libraries, if a library cannot be found by any other means." +"when searching for libraries, if a library cannot be found by any other " +"means." msgstr "" "Sous Linux, si les autres moyens échouent, la fonction utilise la variable " "d'environnement ``LD_LIBRARY_PATH`` pour trouver la bibliothèque." @@ -1622,8 +1632,8 @@ msgstr "" #: library/ctypes.rst:1309 msgid "" "If wrapping a shared library with :mod:`ctypes`, it *may* be better to " -"determine the shared library name at development time, and hardcode that into " -"the wrapper module instead of using :func:`find_library` to locate the " +"determine the shared library name at development time, and hardcode that " +"into the wrapper module instead of using :func:`find_library` to locate the " "library at runtime." msgstr "" "Si vous encapsulez une bibliothèque partagée avec :mod:`ctypes`, il est " @@ -1638,8 +1648,8 @@ msgstr "Chargement des bibliothèques partagées" #: library/ctypes.rst:1319 msgid "" -"There are several ways to load shared libraries into the Python process. One " -"way is to instantiate one of the following classes:" +"There are several ways to load shared libraries into the Python process. " +"One way is to instantiate one of the following classes:" msgstr "" "Il y a plusieurs moyens de charger une bibliothèque partagée dans un " "processus Python. L'un d'entre eux consiste à instancier une des classes " @@ -1647,9 +1657,9 @@ msgstr "" #: library/ctypes.rst:1325 msgid "" -"Instances of this class represent loaded shared libraries. Functions in these " -"libraries use the standard C calling convention, and are assumed to return :c:" -"type:`int`." +"Instances of this class represent loaded shared libraries. Functions in " +"these libraries use the standard C calling convention, and are assumed to " +"return :c:type:`int`." msgstr "" "Une instance de cette classe représente une bibliothèque partagée déjà " "chargée. Les fonctions de cette bibliothèque utilisent la convention d'appel " @@ -1658,22 +1668,22 @@ msgstr "" #: library/ctypes.rst:1329 msgid "" "On Windows creating a :class:`CDLL` instance may fail even if the DLL name " -"exists. When a dependent DLL of the loaded DLL is not found, a :exc:`OSError` " -"error is raised with the message *\"[WinError 126] The specified module could " -"not be found\".* This error message does not contain the name of the missing " -"DLL because the Windows API does not return this information making this " -"error hard to diagnose. To resolve this error and determine which DLL is not " -"found, you need to find the list of dependent DLLs and determine which one is " -"not found using Windows debugging and tracing tools." -msgstr "" -"En Windows, créer une instance de :class:`CDLL` peut échouer, même si une DLL " -"du bon nom existe. Quand une des dépendances de la DLL à charger ne peut pas " -"être trouvée, une :exc:`OSError` est levée avec le message *\"[WinError 126] " -"The specified module could not be found\".* Ce message d'erreur ne contient " -"pas le nom de la DLL manquante car l'API Windows ne fournit pas cette " -"information. Cela rend l'erreur délicate à analyser ; pour la résoudre, il " -"faut lister toutes les dépendances de la DLL et trouver celle qui manque en " -"utilisant des outils de débogage et de traçage Windows." +"exists. When a dependent DLL of the loaded DLL is not found, a :exc:" +"`OSError` error is raised with the message *\"[WinError 126] The specified " +"module could not be found\".* This error message does not contain the name " +"of the missing DLL because the Windows API does not return this information " +"making this error hard to diagnose. To resolve this error and determine " +"which DLL is not found, you need to find the list of dependent DLLs and " +"determine which one is not found using Windows debugging and tracing tools." +msgstr "" +"En Windows, créer une instance de :class:`CDLL` peut échouer, même si une " +"DLL du bon nom existe. Quand une des dépendances de la DLL à charger ne peut " +"pas être trouvée, une :exc:`OSError` est levée avec le message *\"[WinError " +"126] The specified module could not be found\".* Ce message d'erreur ne " +"contient pas le nom de la DLL manquante car l'API Windows ne fournit pas " +"cette information. Cela rend l'erreur délicate à analyser ; pour la " +"résoudre, il faut lister toutes les dépendances de la DLL et trouver celle " +"qui manque en utilisant des outils de débogage et de traçage Windows." #: library/ctypes.rst:1341 msgid "" @@ -1694,11 +1704,11 @@ msgid "" msgstr "" "En Windows seulement : une instance de cette classe représente une " "bibliothèque partagée déjà chargée. Les fonctions de cette bibliothèque " -"utilisent la convention d'appel *stdcall*, et doivent renvoyer un code :class:" -"`HRESULT` (propre à Windows). Les valeurs de :class:`HRESULT` contiennent des " -"informations précisant si l'appel de la fonction a échoué ou s'il a réussi, " -"ainsi qu'un code d'erreur supplémentaire. Si la valeur de retour signale un " -"échec, une :class:`OSError` est levée automatiquement." +"utilisent la convention d'appel *stdcall*, et doivent renvoyer un code :" +"class:`HRESULT` (propre à Windows). Les valeurs de :class:`HRESULT` " +"contiennent des informations précisant si l'appel de la fonction a échoué ou " +"s'il a réussi, ainsi qu'un code d'erreur supplémentaire. Si la valeur de " +"retour signale un échec, une :class:`OSError` est levée automatiquement." #: library/ctypes.rst:1354 msgid ":exc:`WindowsError` used to be raised." @@ -1722,8 +1732,8 @@ msgid "" "on this platform." msgstr "" "Sous Windows CE, seule la convention d'appel standard est utilisée. Pour des " -"raisons pratiques, :class:`WinDLL` et :class:`OleDLL` utilisent la convention " -"d'appel standard sur cette plate-forme." +"raisons pratiques, :class:`WinDLL` et :class:`OleDLL` utilisent la " +"convention d'appel standard sur cette plate-forme." #: library/ctypes.rst:1368 msgid "" @@ -1737,9 +1747,9 @@ msgstr "" #: library/ctypes.rst:1374 msgid "" "Instances of this class behave like :class:`CDLL` instances, except that the " -"Python GIL is *not* released during the function call, and after the function " -"execution the Python error flag is checked. If the error flag is set, a " -"Python exception is raised." +"Python GIL is *not* released during the function call, and after the " +"function execution the Python error flag is checked. If the error flag is " +"set, a Python exception is raised." msgstr "" "Cette classe est identique à :class:`CDLL`, à ceci près que le GIL n'est " "*pas* relâché pendant l'appel de la fonction, et, qu'au terme de l'appel, le " @@ -1754,14 +1764,14 @@ msgstr "" #: library/ctypes.rst:1381 msgid "" "All these classes can be instantiated by calling them with at least one " -"argument, the pathname of the shared library. If you have an existing handle " -"to an already loaded shared library, it can be passed as the ``handle`` named " -"parameter, otherwise the underlying platforms ``dlopen`` or ``LoadLibrary`` " -"function is used to load the library into the process, and to get a handle to " -"it." -msgstr "" -"Toutes ces classes peuvent être instanciées en les appelant avec le chemin de " -"la bibliothèque partagée comme unique argument. Il est aussi possible de " +"argument, the pathname of the shared library. If you have an existing " +"handle to an already loaded shared library, it can be passed as the " +"``handle`` named parameter, otherwise the underlying platforms ``dlopen`` or " +"``LoadLibrary`` function is used to load the library into the process, and " +"to get a handle to it." +msgstr "" +"Toutes ces classes peuvent être instanciées en les appelant avec le chemin " +"de la bibliothèque partagée comme unique argument. Il est aussi possible de " "passer un lien vers une bibliothèque déjà chargée en utilisant le paramètre " "``handle``. Sinon, les fonctions ``dlopen`` ou ``LoadLibrary`` de la plate-" "forme sous-jacente permettent de charger la bibliothèque dans le processus, " @@ -1771,21 +1781,22 @@ msgstr "" msgid "" "The *mode* parameter can be used to specify how the library is loaded. For " "details, consult the :manpage:`dlopen(3)` manpage. On Windows, *mode* is " -"ignored. On posix systems, RTLD_NOW is always added, and is not configurable." +"ignored. On posix systems, RTLD_NOW is always added, and is not " +"configurable." msgstr "" "Le mode de chargement de la bibliothèque est défini par le paramètre *mode*. " -"Pour plus de détails, référez-vous à l'entrée :manpage:`dlopen(3)` du manuel. " -"En Windows, *mode* est ignoré. Sur les systèmes POSIX, RTLD_NOW y est " -"toujours ajouté. Ceci n'est pas configurable." +"Pour plus de détails, référez-vous à l'entrée :manpage:`dlopen(3)` du " +"manuel. En Windows, *mode* est ignoré. Sur les systèmes POSIX, RTLD_NOW y " +"est toujours ajouté. Ceci n'est pas configurable." #: library/ctypes.rst:1393 msgid "" "The *use_errno* parameter, when set to true, enables a ctypes mechanism that " "allows accessing the system :data:`errno` error number in a safe way. :mod:" -"`ctypes` maintains a thread-local copy of the systems :data:`errno` variable; " -"if you call foreign functions created with ``use_errno=True`` then the :data:" -"`errno` value before the function call is swapped with the ctypes private " -"copy, the same happens immediately after the function call." +"`ctypes` maintains a thread-local copy of the systems :data:`errno` " +"variable; if you call foreign functions created with ``use_errno=True`` then " +"the :data:`errno` value before the function call is swapped with the ctypes " +"private copy, the same happens immediately after the function call." msgstr "" "Le paramètre *use_errno*, lorsque défini à vrai, active un mécanisme de " "*ctypes* qui permet d'accéder au numéro d'erreur :data:`errno` du système de " @@ -1797,9 +1808,9 @@ msgstr "" #: library/ctypes.rst:1400 msgid "" -"The function :func:`ctypes.get_errno` returns the value of the ctypes private " -"copy, and the function :func:`ctypes.set_errno` changes the ctypes private " -"copy to a new value and returns the former value." +"The function :func:`ctypes.get_errno` returns the value of the ctypes " +"private copy, and the function :func:`ctypes.set_errno` changes the ctypes " +"private copy to a new value and returns the former value." msgstr "" "La fonction :func:`ctypes.get_errno` renvoie la valeur de la copie privée de " "*ctypes*. La fonction :func:`ctypes.set_errno` affecte une nouvelle valeur à " @@ -1809,32 +1820,32 @@ msgstr "" msgid "" "The *use_last_error* parameter, when set to true, enables the same mechanism " "for the Windows error code which is managed by the :func:`GetLastError` and :" -"func:`SetLastError` Windows API functions; :func:`ctypes.get_last_error` and :" -"func:`ctypes.set_last_error` are used to request and change the ctypes " +"func:`SetLastError` Windows API functions; :func:`ctypes.get_last_error` " +"and :func:`ctypes.set_last_error` are used to request and change the ctypes " "private copy of the windows error code." msgstr "" -"Définir le paramètre *use_last_error* à vrai active le même mécanisme pour le " -"code d'erreur de Windows qui est géré par les fonctions :func:`GetLastError` " -"et :func:`SetLastError` de l'API Windows ; :func:`ctypes.get_last_error` et :" -"func:`ctypes.set_last_error` servent à obtenir et modifier la copie privée " -"*ctypes* de ce code d'erreur." +"Définir le paramètre *use_last_error* à vrai active le même mécanisme pour " +"le code d'erreur de Windows qui est géré par les fonctions :func:" +"`GetLastError` et :func:`SetLastError` de l'API Windows ; :func:`ctypes." +"get_last_error` et :func:`ctypes.set_last_error` servent à obtenir et " +"modifier la copie privée *ctypes* de ce code d'erreur." #: library/ctypes.rst:1410 msgid "" "The *winmode* parameter is used on Windows to specify how the library is " "loaded (since *mode* is ignored). It takes any value that is valid for the " "Win32 API ``LoadLibraryEx`` flags parameter. When omitted, the default is to " -"use the flags that result in the most secure DLL load to avoiding issues such " -"as DLL hijacking. Passing the full path to the DLL is the safest way to " +"use the flags that result in the most secure DLL load to avoiding issues " +"such as DLL hijacking. Passing the full path to the DLL is the safest way to " "ensure the correct library and dependencies are loaded." msgstr "" "Sous Windows, le paramètre *winmode* définit comment charger la bibliothèque " "(puisque *mode* est ignoré). Il accepte toute valeur compatible avec le " "drapeau ``LoadLibraryEx`` de l'API Win32. Lorsqu'il est omis, les drapeaux " "par défaut sont ceux qui chargent la DLL de la manière la plus sécurisée " -"possible, afin d'éviter des problèmes comme le détournement de DLL. Passer le " -"chemin complet à la DLL reste le moyen le plus sûr de s'assurer que la bonne " -"bibliothèque et les bonnes dépendances sont chargées." +"possible, afin d'éviter des problèmes comme le détournement de DLL. Passer " +"le chemin complet à la DLL reste le moyen le plus sûr de s'assurer que la " +"bonne bibliothèque et les bonnes dépendances sont chargées." #: library/ctypes.rst:1417 msgid "Added *winmode* parameter." @@ -1861,22 +1872,23 @@ msgid "" "The default mode which is used to load shared libraries. On OSX 10.3, this " "is *RTLD_GLOBAL*, otherwise it is the same as *RTLD_LOCAL*." msgstr "" -"Mode de chargement par défaut des bibliothèques partagées. Vaut *RTLD_GLOBAL* " -"sur OSX 10.3 et *RTLD_LOCAL* sur les autres systèmes d'exploitation." +"Mode de chargement par défaut des bibliothèques partagées. Vaut " +"*RTLD_GLOBAL* sur OSX 10.3 et *RTLD_LOCAL* sur les autres systèmes " +"d'exploitation." #: library/ctypes.rst:1441 msgid "" -"Instances of these classes have no public methods. Functions exported by the " -"shared library can be accessed as attributes or by index. Please note that " -"accessing the function through an attribute caches the result and therefore " -"accessing it repeatedly returns the same object each time. On the other " -"hand, accessing it through an index returns a new object each time::" +"Instances of these classes have no public methods. Functions exported by " +"the shared library can be accessed as attributes or by index. Please note " +"that accessing the function through an attribute caches the result and " +"therefore accessing it repeatedly returns the same object each time. On the " +"other hand, accessing it through an index returns a new object each time::" msgstr "" "Les instances de ces classes n'ont pas de méthodes publiques ; on accède aux " -"fonctions de la bibliothèque partagée par attribut ou par indiçage. Notez que " -"les résultats des accès par attribut sont mis en cache, et donc des accès " -"consécutifs renvoient à chaque fois le même objet. Accéder à une fonction par " -"indice renvoie cependant chaque fois un nouvel objet :" +"fonctions de la bibliothèque partagée par attribut ou par indiçage. Notez " +"que les résultats des accès par attribut sont mis en cache, et donc des " +"accès consécutifs renvoient à chaque fois le même objet. Accéder à une " +"fonction par indice renvoie cependant chaque fois un nouvel objet :" #: library/ctypes.rst:1454 msgid "" @@ -1955,8 +1967,8 @@ msgstr "Pour créer des instances de :class:`PyDLL`." #: library/ctypes.rst:1514 msgid "" -"For accessing the C Python api directly, a ready-to-use Python shared library " -"object is available:" +"For accessing the C Python api directly, a ready-to-use Python shared " +"library object is available:" msgstr "Il existe un moyen rapide d'accéder directement à l'API C Python :" #: library/ctypes.rst:1520 @@ -1982,9 +1994,9 @@ msgstr "" #: library/ctypes.rst:1527 msgid "" -"Loading a library through any of these objects raises an :ref:`auditing event " -"` ``ctypes.dlopen`` with string argument ``name``, the name used to " -"load the library." +"Loading a library through any of these objects raises an :ref:`auditing " +"event ` ``ctypes.dlopen`` with string argument ``name``, the name " +"used to load the library." msgstr "" "Charger une bibliothèque à l'aide d'un de ces objets avec en argument " "``name``, le nom de la bibliothèque (une chaîne de caractères), lève un :ref:" @@ -2100,32 +2112,32 @@ msgstr "" msgid "" "Assign a tuple of ctypes types to specify the argument types that the " "function accepts. Functions using the ``stdcall`` calling convention can " -"only be called with the same number of arguments as the length of this tuple; " -"functions using the C calling convention accept additional, unspecified " -"arguments as well." +"only be called with the same number of arguments as the length of this " +"tuple; functions using the C calling convention accept additional, " +"unspecified arguments as well." msgstr "" "Fait correspondre le type des arguments que la fonction accepte avec un *n*-" "uplet de types *ctypes*. Les fonctions qui utilisent la convention d'appel " "``stdcall`` ne peuvent être appelées qu'avec le même nombre d'arguments que " -"la taille du *n*-uplet mais les fonctions qui utilisent la convention d'appel " -"C acceptent aussi des arguments additionnels non-définis." +"la taille du *n*-uplet mais les fonctions qui utilisent la convention " +"d'appel C acceptent aussi des arguments additionnels non-définis." #: library/ctypes.rst:1585 msgid "" "When a foreign function is called, each actual argument is passed to the :" "meth:`from_param` class method of the items in the :attr:`argtypes` tuple, " -"this method allows adapting the actual argument to an object that the foreign " -"function accepts. For example, a :class:`c_char_p` item in the :attr:" -"`argtypes` tuple will convert a string passed as argument into a bytes object " -"using ctypes conversion rules." +"this method allows adapting the actual argument to an object that the " +"foreign function accepts. For example, a :class:`c_char_p` item in the :" +"attr:`argtypes` tuple will convert a string passed as argument into a bytes " +"object using ctypes conversion rules." msgstr "" "À l'appel d'une fonction externe, chaque argument est passé à la méthode de " "classe :meth:`from_param` de l'élément correspondant dans le *n*-uplet des :" "attr:`argtypes`. Cette méthode convertit l'argument initial en un objet que " "la fonction externe peut comprendre. Par exemple, un :class:`c_char_p` dans " "le *n*-uplet des :attr:`argtypes` va transformer la chaîne de caractères " -"passée en argument en un objet chaîne d'octets selon les règles de conversion " -"*ctypes*." +"passée en argument en un objet chaîne d'octets selon les règles de " +"conversion *ctypes*." #: library/ctypes.rst:1592 msgid "" @@ -2134,8 +2146,8 @@ msgid "" "usable as argument (integer, string, ctypes instance). This allows defining " "adapters that can adapt custom objects as function parameters." msgstr "" -"Nouveau : il est maintenant possible de mettre des objets qui ne sont pas des " -"types de *ctypes* dans les *argtypes*, mais ceux-ci doivent avoir une " +"Nouveau : il est maintenant possible de mettre des objets qui ne sont pas " +"des types de *ctypes* dans les *argtypes*, mais ceux-ci doivent avoir une " "méthode :meth:`from_param` renvoyant une valeur qui peut être utilisée comme " "un argument (entier, chaîne de caractères ou instance *ctypes*). Ceci permet " "de créer des adaptateurs qui convertissent des objets arbitraires en des " @@ -2163,16 +2175,18 @@ msgid "" "callable object to check or post process the results of several functions." msgstr "" "*func* est l'objet représentant la fonction externe elle-même. Cet accesseur " -"permet de réutiliser le même appelable pour vérifier le résultat de plusieurs " -"fonctions ou de faire des actions supplémentaires après leur exécution." +"permet de réutiliser le même appelable pour vérifier le résultat de " +"plusieurs fonctions ou de faire des actions supplémentaires après leur " +"exécution." #: library/ctypes.rst:1613 msgid "" "*arguments* is a tuple containing the parameters originally passed to the " "function call, this allows specializing the behavior on the arguments used." msgstr "" -"*arguments* est le *n*-uplet qui contient les paramètres initiaux passés à la " -"fonction, ceci permet de spécialiser le comportement des arguments utilisés." +"*arguments* est le *n*-uplet qui contient les paramètres initiaux passés à " +"la fonction, ceci permet de spécialiser le comportement des arguments " +"utilisés." #: library/ctypes.rst:1617 msgid "" @@ -2189,8 +2203,8 @@ msgid "" "This exception is raised when a foreign function call cannot convert one of " "the passed arguments." msgstr "" -"Exception levée quand un appel à la fonction externe ne peut pas convertir un " -"des arguments qu'elle a reçus." +"Exception levée quand un appel à la fonction externe ne peut pas convertir " +"un des arguments qu'elle a reçus." #: library/ctypes.rst:1628 msgid "" @@ -2203,14 +2217,14 @@ msgstr "" #: library/ctypes.rst:1630 msgid "" "On Windows, when a foreign function call raises a system exception (for " -"example, due to an access violation), it will be captured and replaced with a " -"suitable Python exception. Further, an auditing event ``ctypes." -"seh_exception`` with argument ``code`` will be raised, allowing an audit hook " -"to replace the exception with its own." +"example, due to an access violation), it will be captured and replaced with " +"a suitable Python exception. Further, an auditing event ``ctypes." +"seh_exception`` with argument ``code`` will be raised, allowing an audit " +"hook to replace the exception with its own." msgstr "" "En Windows, quand un appel à une fonction externe lève une exception système " -"(par exemple, une erreur de segmentation), celle-ci est interceptée pour être " -"remplacée par l'exception Python correspondante. De plus, un évènement " +"(par exemple, une erreur de segmentation), celle-ci est interceptée pour " +"être remplacée par l'exception Python correspondante. De plus, un évènement " "d'audit ``ctypes.seh_exception`` est levé avec ``code`` en argument, ce qui " "permet à un point d'entrée (*hook* en anglais) d'audit de remplacer " "l'exception par une des siennes." @@ -2252,11 +2266,12 @@ msgstr "" "Il est aussi possible de créer des fonctions externes en instanciant des " "prototypes de fonction. Les prototypes de fonction ressemblent beaucoup aux " "prototypes de fonctions en C ; ils décrivent une fonction (type de retour, " -"type des arguments, convention d'appel) sans préciser son implémentation. Les " -"fabriques de fonction prennent en entrée le type de retour et le type des " -"arguments de la fonction, et peuvent être utilisées comme des décorateurs-" -"fabrique et ainsi, s'appliquer à des fonctions avec la syntaxe " -"``@décorateur``. Voir :ref:`ctypes-callback-functions` pour des exemples." +"type des arguments, convention d'appel) sans préciser son implémentation. " +"Les fabriques de fonction prennent en entrée le type de retour et le type " +"des arguments de la fonction, et peuvent être utilisées comme des " +"décorateurs-fabrique et ainsi s'appliquer à des fonctions avec la syntaxe " +"``@décorateur``. Ceci est illustré dans la section :ref:`ctypes-callback-" +"functions`." #: library/ctypes.rst:1657 msgid "" @@ -2266,11 +2281,11 @@ msgid "" "`errno` variable is exchanged with the real :data:`errno` value before and " "after the call; *use_last_error* does the same for the Windows error code." msgstr "" -"Renvoie un prototype de fonction qui crée des fonctions qui respectent la " +"Renvoie un prototype de fonction qui crée des fonctions qui suivent la " "convention d'appel standard C. Les fonctions libèreront le GIL lors de leur " "exécution. Si *use_errno* est vrai, la copie privée *ctypes* de la variable " -"système :data:`errno` variable est échangée avec la vraie valeur de :data:" -"`errno` avant et après l'appel ; *use_last_error* a le même effet en Windows." +"système :data:`errno` est échangée avec la vraie valeur de :data:`errno` " +"avant et après l'appel ; *use_last_error* a le même effet en Windows." #: library/ctypes.rst:1667 msgid "" @@ -2280,29 +2295,29 @@ msgid "" "the GIL during the call. *use_errno* and *use_last_error* have the same " "meaning as above." msgstr "" -"En Windows seuleument : renvoie un prototype de fonction qui crée des " -"fonctions qui respectent la convention d'appel standard ``stdcall``, sauf " -"sous WIndows CE où :func:`WINFUNCTYPE` équivaut à :func:`CFUNCTYPE`. Les " +"En Windows seulement : renvoie un prototype de fonction qui crée des " +"fonctions qui suivent la convention d'appel standard ``stdcall``, sauf sous " +"Windows CE où :func:`WINFUNCTYPE` équivaut à :func:`CFUNCTYPE`. Les " "fonctions libèreront le GIL lors de leur exécution. *use_errno* et " "*use_last_error* ont la même signification que ci-dessus." #: library/ctypes.rst:1676 msgid "" -"The returned function prototype creates functions that use the Python calling " -"convention. The function will *not* release the GIL during the call." +"The returned function prototype creates functions that use the Python " +"calling convention. The function will *not* release the GIL during the call." msgstr "" -"Renvoie un prototype de fonction qui crée des fonctions qui respectent la " +"Renvoie un prototype de fonction qui crée des fonctions qui suivent la " "convention d'appel Python. Les fonctions ne libèreront *pas* le GIL lors de " "leur exécution." #: library/ctypes.rst:1679 msgid "" -"Function prototypes created by these factory functions can be instantiated in " -"different ways, depending on the type and number of the parameters in the " +"Function prototypes created by these factory functions can be instantiated " +"in different ways, depending on the type and number of the parameters in the " "call:" msgstr "" -"Il y a plusieurs façons d'instancier les prototypes de fonction créés par ces " -"fabriques, selon le type et le nombre de paramètres de l'appel :" +"Il y a plusieurs façons d'instancier les prototypes de fonction créés par " +"ces fabriques, selon le type et le nombre de paramètres de l'appel :" #: library/ctypes.rst:1687 msgid "" @@ -2314,15 +2329,15 @@ msgstr "" msgid "" "Create a C callable function (a callback function) from a Python *callable*." msgstr "" -"Crée une fonction appelable depuis du C (une fonction de rappel) d'un " -"appelable Python." +"Crée une fonction appelable depuis du code C (une fonction de rappel) d'un " +"appelable Python donné en paramètre." #: library/ctypes.rst:1701 msgid "" "Returns a foreign function exported by a shared library. *func_spec* must be " "a 2-tuple ``(name_or_ordinal, library)``. The first item is the name of the " -"exported function as string, or the ordinal of the exported function as small " -"integer. The second item is the shared library instance." +"exported function as string, or the ordinal of the exported function as " +"small integer. The second item is the shared library instance." msgstr "" "Renvoie une fonction externe exposée par une bibliothèque partagée. " "*func_spec* est un couple ``(nom_ou_index, bibliothèque)``. Le premier " @@ -2372,16 +2387,16 @@ msgid "" "must be a tuple containing one, two, or three items." msgstr "" "Chaque élément de ce *n*-uplet contient des informations supplémentaires sur " -"un des paramètres. Ce doit être aussi un *n*-uplet, avec un, deux ou trois " -"éléments." +"le paramètre correspondant. Ce doit être aussi un *n*-uplet, avec un, deux " +"ou trois éléments." #: library/ctypes.rst:1728 msgid "" "The first item is an integer containing a combination of direction flags for " "the parameter:" msgstr "" -"Le premier élément est un entier qui contient une combinaison de drapeaux qui " -"précisent le sens des paramètres (entrée ou sortie) :" +"Le premier élément est un entier qui contient une combinaison de drapeaux " +"qui précisent le sens des paramètres (entrée ou sortie) :" #: library/ctypes.rst:1732 msgid "1" @@ -2412,32 +2427,46 @@ msgid "" "The optional second item is the parameter name as string. If this is " "specified, the foreign function can be called with named parameters." msgstr "" +"Le deuxième élément (optionnel) est une chaîne de caractères représentant le " +"nom du paramètre. Si cet élément est donné, la fonction externe pourra être " +"appelée avec des paramètres nommés." #: library/ctypes.rst:1743 msgid "The optional third item is the default value for this parameter." msgstr "" +"Le troisième élément (optionnel) est la valeur par défaut du paramètre." #: library/ctypes.rst:1745 msgid "" -"This example demonstrates how to wrap the Windows ``MessageBoxW`` function so " -"that it supports default parameters and named arguments. The C declaration " -"from the windows header file is this::" +"This example demonstrates how to wrap the Windows ``MessageBoxW`` function " +"so that it supports default parameters and named arguments. The C " +"declaration from the windows header file is this::" msgstr "" +"L'exemple suivant montre comment encapsuler la fonction Windows " +"``MessageBoxW`` afin que celle-ci prenne en charge des paramètres par défaut " +"et des arguments nommés. Sa déclaration C dans le fichier d'en-tête des " +"fenêtres est ::" #: library/ctypes.rst:1779 msgid "Here is the wrapping with :mod:`ctypes`::" -msgstr "" +msgstr "L'encapsulation :mod:`ctypes` correspondante est alors ::" #: library/ctypes.rst:1764 msgid "The ``MessageBox`` foreign function can now be called in these ways::" msgstr "" +"La fonction ``MessageBox`` peut désormais être appelée des manières " +"suivantes ::" #: library/ctypes.rst:1770 msgid "" -"A second example demonstrates output parameters. The win32 ``GetWindowRect`` " -"function retrieves the dimensions of a specified window by copying them into " -"``RECT`` structure that the caller has to supply. Here is the C declaration::" +"A second example demonstrates output parameters. The win32 " +"``GetWindowRect`` function retrieves the dimensions of a specified window by " +"copying them into ``RECT`` structure that the caller has to supply. Here is " +"the C declaration::" msgstr "" +"L'exemple qui suit traite des paramètres en sortie. La fonction win32 " +"``GetWindowRect`` donne les dimensions d'une fenêtre en les copiant dans une " +"structure ``RECT`` que l'appelant doit fournir. Sa déclaration en C est ::" #: library/ctypes.rst:1788 msgid "" @@ -2446,6 +2475,11 @@ msgid "" "parameter values when there are more than one, so the GetWindowRect function " "now returns a RECT instance, when called." msgstr "" +"Les fonctions avec des paramètres en sortie renvoient automatiquement la " +"valeur du paramètre de sortie s'il n'y en a qu'un seul, ou un *n*-uplet avec " +"les valeurs de sortie de chaque paramètre s'il y en a plusieurs. Ici, la " +"fonction *GetWindowRect* renvoie donc une instance de *RECT* quand elle est " +"appelée." #: library/ctypes.rst:1793 msgid "" @@ -2455,6 +2489,11 @@ msgid "" "function could do the error checking, and raises an exception when the api " "call failed::" msgstr "" +"Il est possible de combiner des paramètres en sortie avec le protocole :attr:" +"`errcheck` pour post-traiter les sorties et faire de la vérification " +"d'erreur. La fonction de l'API win32 ``GetWindowRect`` renvoie un ``BOOL`` " +"pour indiquer le succès ou l'échec de l'exécution, donc cette fonction peut " +"vérifier le résultat et lever une exception quand l'appel à l'API a échoué ::" #: library/ctypes.rst:1806 msgid "" @@ -2464,6 +2503,12 @@ msgid "" "instead of a ``RECT`` instance, you can retrieve the fields in the function " "and return them instead, the normal processing will no longer take place::" msgstr "" +"Si la fonction :attr:`errcheck` renvoie le *n*-uplet passé en paramètre sans " +"rien y changer, :mod:`ctypes` continue l'exécution habituelle des paramètres " +"en sortie. Si on préfère renvoyer un *n*-uplet de coordonnées au lieu de " +"renvoyer une instance de ``RECT``, il faut récupérer les champs " +"correspondants et les renvoyer en retour. Dans ce cas, l'exécution " +"habituelle n'a plus lieu ::" #: library/ctypes.rst:1825 msgid "Utility functions" @@ -2477,8 +2522,8 @@ msgstr "" #: library/ctypes.rst:1832 msgid "" -"Raises an :ref:`auditing event ` ``ctypes.addressof`` with argument " -"``obj``." +"Raises an :ref:`auditing event ` ``ctypes.addressof`` with " +"argument ``obj``." msgstr "" #: library/ctypes.rst:1837 @@ -2500,16 +2545,16 @@ msgstr "" #: library/ctypes.rst:1851 msgid "" -"The returned object can only be used as a foreign function call parameter. It " -"behaves similar to ``pointer(obj)``, but the construction is a lot faster." +"The returned object can only be used as a foreign function call parameter. " +"It behaves similar to ``pointer(obj)``, but the construction is a lot faster." msgstr "" #: library/ctypes.rst:1857 msgid "" -"This function is similar to the cast operator in C. It returns a new instance " -"of *type* which points to the same memory block as *obj*. *type* must be a " -"pointer type, and *obj* must be an object that can be interpreted as a " -"pointer." +"This function is similar to the cast operator in C. It returns a new " +"instance of *type* which points to the same memory block as *obj*. *type* " +"must be a pointer type, and *obj* must be an object that can be interpreted " +"as a pointer." msgstr "" #: library/ctypes.rst:1865 @@ -2520,17 +2565,17 @@ msgstr "" #: library/ctypes.rst:1868 msgid "" -"*init_or_size* must be an integer which specifies the size of the array, or a " -"bytes object which will be used to initialize the array items." +"*init_or_size* must be an integer which specifies the size of the array, or " +"a bytes object which will be used to initialize the array items." msgstr "" #: library/ctypes.rst:1871 msgid "" -"If a bytes object is specified as first argument, the buffer is made one item " -"larger than its length so that the last element in the array is a NUL " +"If a bytes object is specified as first argument, the buffer is made one " +"item larger than its length so that the last element in the array is a NUL " "termination character. An integer can be passed as second argument which " -"allows specifying the size of the array if the length of the bytes should not " -"be used." +"allows specifying the size of the array if the length of the bytes should " +"not be used." msgstr "" #: library/ctypes.rst:1876 @@ -2541,21 +2586,21 @@ msgstr "" #: library/ctypes.rst:1881 msgid "" -"This function creates a mutable unicode character buffer. The returned object " -"is a ctypes array of :class:`c_wchar`." +"This function creates a mutable unicode character buffer. The returned " +"object is a ctypes array of :class:`c_wchar`." msgstr "" #: library/ctypes.rst:1884 msgid "" -"*init_or_size* must be an integer which specifies the size of the array, or a " -"string which will be used to initialize the array items." +"*init_or_size* must be an integer which specifies the size of the array, or " +"a string which will be used to initialize the array items." msgstr "" #: library/ctypes.rst:1887 msgid "" "If a string is specified as first argument, the buffer is made one item " -"larger than the length of the string so that the last element in the array is " -"a NUL termination character. An integer can be passed as second argument " +"larger than the length of the string so that the last element in the array " +"is a NUL termination character. An integer can be passed as second argument " "which allows specifying the size of the array if the length of the string " "should not be used." msgstr "" @@ -2569,8 +2614,8 @@ msgstr "" #: library/ctypes.rst:1898 msgid "" "Windows only: This function is a hook which allows implementing in-process " -"COM servers with ctypes. It is called from the DllCanUnloadNow function that " -"the _ctypes extension dll exports." +"COM servers with ctypes. It is called from the DllCanUnloadNow function " +"that the _ctypes extension dll exports." msgstr "" #: library/ctypes.rst:1905 @@ -2584,8 +2629,8 @@ msgstr "" msgid "" "Try to find a library and return a pathname. *name* is the library name " "without any prefix like ``lib``, suffix like ``.so``, ``.dylib`` or version " -"number (this is the form used for the posix linker option :option:`!-l`). If " -"no library can be found, returns ``None``." +"number (this is the form used for the posix linker option :option:`!-l`). " +"If no library can be found, returns ``None``." msgstr "" #: library/ctypes.rst:1924 @@ -2643,8 +2688,8 @@ msgstr "" #: library/ctypes.rst:1962 msgid "" "Same as the standard C memmove library function: copies *count* bytes from " -"*src* to *dst*. *dst* and *src* must be integers or ctypes instances that can " -"be converted to pointers." +"*src* to *dst*. *dst* and *src* must be integers or ctypes instances that " +"can be converted to pointers." msgstr "" #: library/ctypes.rst:1969 @@ -2663,8 +2708,8 @@ msgstr "" #: library/ctypes.rst:1983 msgid "" -"This function creates a new pointer instance, pointing to *obj*. The returned " -"object is of the type ``POINTER(type(obj))``." +"This function creates a new pointer instance, pointing to *obj*. The " +"returned object is of the type ``POINTER(type(obj))``." msgstr "" #: library/ctypes.rst:1986 @@ -2689,15 +2734,15 @@ msgstr "" #: library/ctypes.rst:2003 msgid "" -"Raises an :ref:`auditing event ` ``ctypes.set_errno`` with argument " -"``errno``." +"Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " +"argument ``errno``." msgstr "" #: library/ctypes.rst:2008 msgid "" -"Windows only: set the current value of the ctypes-private copy of the system :" -"data:`LastError` variable in the calling thread to *value* and return the " -"previous value." +"Windows only: set the current value of the ctypes-private copy of the " +"system :data:`LastError` variable in the calling thread to *value* and " +"return the previous value." msgstr "" #: library/ctypes.rst:2012 @@ -2728,9 +2773,10 @@ msgstr "" #: library/ctypes.rst:2032 msgid "" "Windows only: this function is probably the worst-named thing in ctypes. It " -"creates an instance of OSError. If *code* is not specified, ``GetLastError`` " -"is called to determine the error code. If *descr* is not specified, :func:" -"`FormatError` is called to get a textual description of the error." +"creates an instance of OSError. If *code* is not specified, " +"``GetLastError`` is called to determine the error code. If *descr* is not " +"specified, :func:`FormatError` is called to get a textual description of the " +"error." msgstr "" #: library/ctypes.rst:2038 @@ -2775,9 +2821,9 @@ msgstr "" msgid "" "This method returns a ctypes instance that shares the buffer of the *source* " "object. The *source* object must support the writeable buffer interface. " -"The optional *offset* parameter specifies an offset into the source buffer in " -"bytes; the default is zero. If the source buffer is not large enough a :exc:" -"`ValueError` is raised." +"The optional *offset* parameter specifies an offset into the source buffer " +"in bytes; the default is zero. If the source buffer is not large enough a :" +"exc:`ValueError` is raised." msgstr "" #: library/ctypes.rst:2088 @@ -2790,8 +2836,8 @@ msgstr "" msgid "" "This method creates a ctypes instance, copying the buffer from the *source* " "object buffer which must be readable. The optional *offset* parameter " -"specifies an offset into the source buffer in bytes; the default is zero. If " -"the source buffer is not large enough a :exc:`ValueError` is raised." +"specifies an offset into the source buffer in bytes; the default is zero. " +"If the source buffer is not large enough a :exc:`ValueError` is raised." msgstr "" #: library/ctypes.rst:2092 @@ -2823,8 +2869,8 @@ msgstr "" #: library/ctypes.rst:2108 msgid "" "All ctypes data types have a default implementation of this classmethod that " -"normally returns *obj* if that is an instance of the type. Some types accept " -"other objects as well." +"normally returns *obj* if that is an instance of the type. Some types " +"accept other objects as well." msgstr "" #: library/ctypes.rst:2114 @@ -2854,19 +2900,19 @@ msgstr "" #: library/ctypes.rst:2134 msgid "" -"This member is either ``None`` or a dictionary containing Python objects that " -"need to be kept alive so that the memory block contents is kept valid. This " -"object is only exposed for debugging; never modify the contents of this " +"This member is either ``None`` or a dictionary containing Python objects " +"that need to be kept alive so that the memory block contents is kept valid. " +"This object is only exposed for debugging; never modify the contents of this " "dictionary." msgstr "" #: library/ctypes.rst:2147 msgid "" -"This non-public class is the base class of all fundamental ctypes data types. " -"It is mentioned here because it contains the common attributes of the " -"fundamental ctypes data types. :class:`_SimpleCData` is a subclass of :class:" -"`_CData`, so it inherits their methods and attributes. ctypes data types that " -"are not and do not contain pointers can now be pickled." +"This non-public class is the base class of all fundamental ctypes data " +"types. It is mentioned here because it contains the common attributes of the " +"fundamental ctypes data types. :class:`_SimpleCData` is a subclass of :" +"class:`_CData`, so it inherits their methods and attributes. ctypes data " +"types that are not and do not contain pointers can now be pickled." msgstr "" #: library/ctypes.rst:2153 @@ -2885,23 +2931,23 @@ msgstr "" msgid "" "When the ``value`` attribute is retrieved from a ctypes instance, usually a " "new object is returned each time. :mod:`ctypes` does *not* implement " -"original object return, always a new object is constructed. The same is true " -"for all other ctypes object instances." +"original object return, always a new object is constructed. The same is " +"true for all other ctypes object instances." msgstr "" #: library/ctypes.rst:2168 msgid "" "Fundamental data types, when returned as foreign function call results, or, " "for example, by retrieving structure field members or array items, are " -"transparently converted to native Python types. In other words, if a foreign " -"function has a :attr:`restype` of :class:`c_char_p`, you will always receive " -"a Python bytes object, *not* a :class:`c_char_p` instance." +"transparently converted to native Python types. In other words, if a " +"foreign function has a :attr:`restype` of :class:`c_char_p`, you will always " +"receive a Python bytes object, *not* a :class:`c_char_p` instance." msgstr "" #: library/ctypes.rst:2176 msgid "" -"Subclasses of fundamental data types do *not* inherit this behavior. So, if a " -"foreign functions :attr:`restype` is a subclass of :class:`c_void_p`, you " +"Subclasses of fundamental data types do *not* inherit this behavior. So, if " +"a foreign functions :attr:`restype` is a subclass of :class:`c_void_p`, you " "will receive an instance of this subclass from the function call. Of course, " "you can get the value of the pointer by accessing the ``value`` attribute." msgstr "" @@ -2966,20 +3012,20 @@ msgstr "" #: library/ctypes.rst:2238 msgid "" -"Represents the C 16-bit :c:type:`signed int` datatype. Usually an alias for :" -"class:`c_short`." +"Represents the C 16-bit :c:type:`signed int` datatype. Usually an alias " +"for :class:`c_short`." msgstr "" #: library/ctypes.rst:2244 msgid "" -"Represents the C 32-bit :c:type:`signed int` datatype. Usually an alias for :" -"class:`c_int`." +"Represents the C 32-bit :c:type:`signed int` datatype. Usually an alias " +"for :class:`c_int`." msgstr "" #: library/ctypes.rst:2250 msgid "" -"Represents the C 64-bit :c:type:`signed int` datatype. Usually an alias for :" -"class:`c_longlong`." +"Represents the C 64-bit :c:type:`signed int` datatype. Usually an alias " +"for :class:`c_longlong`." msgstr "" #: library/ctypes.rst:2256 @@ -2996,8 +3042,8 @@ msgstr "" #: library/ctypes.rst:2268 msgid "" -"Represents the C :c:type:`signed short` datatype. The constructor accepts an " -"optional integer initializer; no overflow checking is done." +"Represents the C :c:type:`signed short` datatype. The constructor accepts " +"an optional integer initializer; no overflow checking is done." msgstr "" #: library/ctypes.rst:2274 @@ -3010,15 +3056,15 @@ msgstr "" #: library/ctypes.rst:2286 msgid "" -"Represents the C :c:type:`unsigned char` datatype, it interprets the value as " -"small integer. The constructor accepts an optional integer initializer; no " -"overflow checking is done." +"Represents the C :c:type:`unsigned char` datatype, it interprets the value " +"as small integer. The constructor accepts an optional integer initializer; " +"no overflow checking is done." msgstr "" #: library/ctypes.rst:2293 msgid "" -"Represents the C :c:type:`unsigned int` datatype. The constructor accepts an " -"optional integer initializer; no overflow checking is done. On platforms " +"Represents the C :c:type:`unsigned int` datatype. The constructor accepts " +"an optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias for :class:`c_ulong`." msgstr "" @@ -3066,8 +3112,8 @@ msgstr "" #: library/ctypes.rst:2342 msgid "" -"Represents the C :c:type:`void *` type. The value is represented as integer. " -"The constructor accepts an optional integer initializer." +"Represents the C :c:type:`void *` type. The value is represented as " +"integer. The constructor accepts an optional integer initializer." msgstr "" #: library/ctypes.rst:2348 @@ -3093,8 +3139,8 @@ msgstr "" #: library/ctypes.rst:2369 msgid "" -"Windows only: Represents a :c:type:`HRESULT` value, which contains success or " -"error information for a function or method call." +"Windows only: Represents a :c:type:`HRESULT` value, which contains success " +"or error information for a function or method call." msgstr "" #: library/ctypes.rst:2375 @@ -3174,10 +3220,10 @@ msgstr "" #: library/ctypes.rst:2440 msgid "" -"The :attr:`_fields_` class variable must, however, be defined before the type " -"is first used (an instance is created, :func:`sizeof` is called on it, and so " -"on). Later assignments to the :attr:`_fields_` class variable will raise an " -"AttributeError." +"The :attr:`_fields_` class variable must, however, be defined before the " +"type is first used (an instance is created, :func:`sizeof` is called on it, " +"and so on). Later assignments to the :attr:`_fields_` class variable will " +"raise an AttributeError." msgstr "" #: library/ctypes.rst:2445 @@ -3197,8 +3243,8 @@ msgstr "" #: library/ctypes.rst:2459 msgid "" "An optional sequence that lists the names of unnamed (anonymous) fields. :" -"attr:`_anonymous_` must be already defined when :attr:`_fields_` is assigned, " -"otherwise it will have no effect." +"attr:`_anonymous_` must be already defined when :attr:`_fields_` is " +"assigned, otherwise it will have no effect." msgstr "" #: library/ctypes.rst:2463 @@ -3217,8 +3263,8 @@ msgstr "" msgid "" "The ``TYPEDESC`` structure describes a COM data type, the ``vt`` field " "specifies which one of the union fields is valid. Since the ``u`` field is " -"defined as anonymous field, it is now possible to access the members directly " -"off the TYPEDESC instance. ``td.lptdesc`` and ``td.u.lptdesc`` are " +"defined as anonymous field, it is now possible to access the members " +"directly off the TYPEDESC instance. ``td.lptdesc`` and ``td.u.lptdesc`` are " "equivalent, but the former is faster since it does not need to create a " "temporary union instance::" msgstr "" @@ -3251,12 +3297,12 @@ msgstr "Classe de base abstraite pour les *arrays*." #: library/ctypes.rst:2515 msgid "" -"The recommended way to create concrete array types is by multiplying any :mod:" -"`ctypes` data type with a positive integer. Alternatively, you can subclass " -"this type and define :attr:`_length_` and :attr:`_type_` class variables. " -"Array elements can be read and written using standard subscript and slice " -"accesses; for slice reads, the resulting object is *not* itself an :class:" -"`Array`." +"The recommended way to create concrete array types is by multiplying any :" +"mod:`ctypes` data type with a positive integer. Alternatively, you can " +"subclass this type and define :attr:`_length_` and :attr:`_type_` class " +"variables. Array elements can be read and written using standard subscript " +"and slice accesses; for slice reads, the resulting object is *not* itself " +"an :class:`Array`." msgstr "" #: library/ctypes.rst:2525 From 643db1e5adef3118a45ada8c342f6f6f450d6013 Mon Sep 17 00:00:00 2001 From: Antoine <43954001+awecx@users.noreply.github.com> Date: Tue, 9 Nov 2021 08:01:01 +0100 Subject: [PATCH 4/7] Suggestion de Jean-Abou-Samra Co-authored-by: Jean-Abou-Samra <37271310+Jean-Abou-Samra@users.noreply.github.com> --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index 380c8709b..ceeda37b5 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -2267,7 +2267,7 @@ msgstr "" "prototypes de fonction. Les prototypes de fonction ressemblent beaucoup aux " "prototypes de fonctions en C ; ils décrivent une fonction (type de retour, " "type des arguments, convention d'appel) sans préciser son implémentation. " -"Les fabriques de fonction prennent en entrée le type de retour et le type " +"Les fabriques de fonctions prennent en entrée le type de retour et le type " "des arguments de la fonction, et peuvent être utilisées comme des " "décorateurs-fabrique et ainsi s'appliquer à des fonctions avec la syntaxe " "``@décorateur``. Ceci est illustré dans la section :ref:`ctypes-callback-" From fe5ce8dea9b91a42a66e75816932f0f9f85f5dd2 Mon Sep 17 00:00:00 2001 From: Antoine <43954001+awecx@users.noreply.github.com> Date: Tue, 9 Nov 2021 08:04:27 +0100 Subject: [PATCH 5/7] Suggestion de Jean-Abou-Samra Co-authored-by: Jean-Abou-Samra <37271310+Jean-Abou-Samra@users.noreply.github.com> --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index ceeda37b5..dacb88f7a 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -2340,7 +2340,7 @@ msgid "" "small integer. The second item is the shared library instance." msgstr "" "Renvoie une fonction externe exposée par une bibliothèque partagée. " -"*func_spec* est un couple ``(nom_ou_index, bibliothèque)``. Le premier " +"*func_spec* est un couple ``(nom_ou_indice, bibliothèque)``. Le premier " "élément est le nom de la fonction à passer comme une chaîne ou bien son " "indice (dans la table des symboles) à passer comme un entier. Le second " "élément est l'instance de la bibliothèque partagée." From dae30e3d7ab491dfb3f3118f12a8756c2e261b78 Mon Sep 17 00:00:00 2001 From: awecx Date: Tue, 9 Nov 2021 08:13:41 +0100 Subject: [PATCH 6/7] Suggestion Jean-Abou-Samra --- library/ctypes.po | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/ctypes.po b/library/ctypes.po index dacb88f7a..7327d0e14 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: Python 3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-09-23 16:16+0200\n" -"PO-Revision-Date: 2021-11-01 17:12+0100\n" +"PO-Revision-Date: 2021-11-09 08:06+0100\n" "Last-Translator: Antoine Wecxsteen\n" "Language-Team: FRENCH \n" "Language: fr\n" @@ -2211,8 +2211,6 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.seh_exception`` with " "argument ``code``." msgstr "" -"Charger une bibliothèque à l'aide d'un de ces objets avec en argument " -"``name``, le nom de la bibliothèque (une chaîne de caractères), l" #: library/ctypes.rst:1630 msgid "" From d1b568fd3ab1e0ef100c6f1c904f205558333f6d Mon Sep 17 00:00:00 2001 From: Antoine <43954001+awecx@users.noreply.github.com> Date: Fri, 26 Nov 2021 21:49:20 +0100 Subject: [PATCH 7/7] Suggestion de JulienPalard. --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index 7327d0e14..3838e182a 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -2283,7 +2283,7 @@ msgstr "" "convention d'appel standard C. Les fonctions libèreront le GIL lors de leur " "exécution. Si *use_errno* est vrai, la copie privée *ctypes* de la variable " "système :data:`errno` est échangée avec la vraie valeur de :data:`errno` " -"avant et après l'appel ; *use_last_error* a le même effet en Windows." +"avant et après l'appel ; *use_last_error* a le même effet sous Windows." #: library/ctypes.rst:1667 msgid ""