forked from AFPy/python-docs-fr
Traduction de library/ctypes (#1760)
Co-authored-by: Jean-Abou-Samra <37271310+Jean-Abou-Samra@users.noreply.github.com>
This commit is contained in:
parent
9882154d71
commit
5f1dd86c9a
|
@ -6,7 +6,7 @@ msgstr ""
|
||||||
"Project-Id-Version: Python 3\n"
|
"Project-Id-Version: Python 3\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2021-09-23 16:16+0200\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-11-09 08:06+0100\n"
|
||||||
"Last-Translator: Antoine Wecxsteen\n"
|
"Last-Translator: Antoine Wecxsteen\n"
|
||||||
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
|
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
|
||||||
"Language: fr\n"
|
"Language: fr\n"
|
||||||
|
@ -36,15 +36,14 @@ msgid "ctypes tutorial"
|
||||||
msgstr "Didacticiel de *ctypes*"
|
msgstr "Didacticiel de *ctypes*"
|
||||||
|
|
||||||
#: library/ctypes.rst:21
|
#: library/ctypes.rst:21
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Note: The code samples in this tutorial use :mod:`doctest` to make sure that "
|
"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, "
|
"they actually work. Since some code samples behave differently under Linux, "
|
||||||
"Windows, or macOS, they contain doctest directives in comments."
|
"Windows, or macOS, they contain doctest directives in comments."
|
||||||
msgstr ""
|
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 "
|
"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."
|
"contiennent des directives *doctest* dans les commentaires."
|
||||||
|
|
||||||
#: library/ctypes.rst:25
|
#: library/ctypes.rst:25
|
||||||
|
@ -54,7 +53,7 @@ msgid ""
|
||||||
"`c_long`. So, you should not be confused if :class:`c_long` is printed if "
|
"`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."
|
"you would expect :class:`c_int` --- they are actually the same type."
|
||||||
msgstr ""
|
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 "
|
"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:"
|
"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 "
|
"`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"
|
msgstr "Alignement et boutisme des structures et des unions"
|
||||||
|
|
||||||
#: library/ctypes.rst:619
|
#: library/ctypes.rst:619
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"By default, Structure and Union fields are aligned in the same way the C "
|
"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 :"
|
"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 ::"
|
"plus tard, après avoir défini la classe ::"
|
||||||
|
|
||||||
#: library/ctypes.rst:918
|
#: library/ctypes.rst:918
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Let's try it. We create two instances of ``cell``, and let them point to "
|
"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::"
|
"each other, and finally follow the pointer chain a few times::"
|
||||||
|
@ -1613,12 +1610,11 @@ msgid "Here are some examples::"
|
||||||
msgstr "Voici quelques exemples :"
|
msgstr "Voici quelques exemples :"
|
||||||
|
|
||||||
#: library/ctypes.rst:1291
|
#: library/ctypes.rst:1291
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"On macOS, :func:`find_library` tries several predefined naming schemes and "
|
"On macOS, :func:`find_library` tries several predefined naming schemes and "
|
||||||
"paths to locate the library, and returns a full pathname if successful::"
|
"paths to locate the library, and returns a full pathname if successful::"
|
||||||
msgstr ""
|
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 "
|
"chemins prédéfinies pour trouver la bibliothèque et en renvoie le chemin "
|
||||||
"complet si elle la trouve :"
|
"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 "
|
"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."
|
"determine which one is not found using Windows debugging and tracing tools."
|
||||||
msgstr ""
|
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
|
#: library/ctypes.rst:1341
|
||||||
msgid ""
|
msgid ""
|
||||||
"`Microsoft DUMPBIN tool <https://docs.microsoft.com/cpp/build/reference/"
|
"`Microsoft DUMPBIN tool <https://docs.microsoft.com/cpp/build/reference/"
|
||||||
"dependents>`_ -- A tool to find DLL dependents."
|
"dependents>`_ -- A tool to find DLL dependents."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"`DUMPBIN <https://docs.microsoft.com/cpp/build/reference/dependents>`_ — un "
|
||||||
|
"utilitaire Microsoft pour lister les dépendances d'une DLL."
|
||||||
|
|
||||||
#: library/ctypes.rst:1347
|
#: library/ctypes.rst:1347
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -1894,7 +1900,7 @@ msgstr ""
|
||||||
|
|
||||||
#: library/ctypes.rst:1460
|
#: library/ctypes.rst:1460
|
||||||
msgid "The system handle used to access the library."
|
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
|
#: library/ctypes.rst:1465
|
||||||
msgid "The name of the library passed in the constructor."
|
msgid "The name of the library passed in the constructor."
|
||||||
|
@ -1979,14 +1985,12 @@ msgstr ""
|
||||||
"utiliser."
|
"utiliser."
|
||||||
|
|
||||||
#: library/ctypes.rst:1525
|
#: library/ctypes.rst:1525
|
||||||
#, fuzzy
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Raises an :ref:`auditing event <auditing>` ``ctypes.dlopen`` with argument "
|
"Raises an :ref:`auditing event <auditing>` ``ctypes.dlopen`` with argument "
|
||||||
"``name``."
|
"``name``."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Charger une bibliothèque à l'aide d'un de ces objets avec en argument "
|
"Lève un :ref:`évènement d'audit <auditing>` ``ctypes.dlopen``, avec en "
|
||||||
"``name``, le nom de la bibliothèque (une chaîne de caractères), lève un :ref:"
|
"argument ``name``."
|
||||||
"`évènement d'audit <auditing>` ``ctypes.dlopen``."
|
|
||||||
|
|
||||||
#: library/ctypes.rst:1527
|
#: library/ctypes.rst:1527
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -2257,6 +2261,15 @@ msgid ""
|
||||||
"decorator factories, and as such, be applied to functions through the "
|
"decorator factories, and as such, be applied to functions through the "
|
||||||
"``@wrapper`` syntax. See :ref:`ctypes-callback-functions` for examples."
|
"``@wrapper`` syntax. See :ref:`ctypes-callback-functions` for examples."
|
||||||
msgstr ""
|
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 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-"
|
||||||
|
"functions`."
|
||||||
|
|
||||||
#: library/ctypes.rst:1657
|
#: library/ctypes.rst:1657
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -2266,6 +2279,11 @@ msgid ""
|
||||||
"`errno` variable is exchanged with the real :data:`errno` value before and "
|
"`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."
|
"after the call; *use_last_error* does the same for the Windows error code."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"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` est échangée avec la vraie valeur de :data:`errno` "
|
||||||
|
"avant et après l'appel ; *use_last_error* a le même effet sous Windows."
|
||||||
|
|
||||||
#: library/ctypes.rst:1667
|
#: library/ctypes.rst:1667
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -2275,12 +2293,20 @@ msgid ""
|
||||||
"the GIL during the call. *use_errno* and *use_last_error* have the same "
|
"the GIL during the call. *use_errno* and *use_last_error* have the same "
|
||||||
"meaning as above."
|
"meaning as above."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"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
|
#: library/ctypes.rst:1676
|
||||||
msgid ""
|
msgid ""
|
||||||
"The returned function prototype creates functions that use the Python "
|
"The returned function prototype creates functions that use the Python "
|
||||||
"calling convention. The function will *not* release the GIL during the call."
|
"calling convention. The function will *not* release the GIL during the call."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"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
|
#: library/ctypes.rst:1679
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -2288,16 +2314,21 @@ msgid ""
|
||||||
"in different ways, depending on the type and number of the parameters in the "
|
"in different ways, depending on the type and number of the parameters in the "
|
||||||
"call:"
|
"call:"
|
||||||
msgstr ""
|
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
|
#: library/ctypes.rst:1687
|
||||||
msgid ""
|
msgid ""
|
||||||
"Returns a foreign function at the specified address which must be an integer."
|
"Returns a foreign function at the specified address which must be an integer."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Renvoie une fonction externe sur l'adresse donnée sous la forme d'un entier."
|
||||||
|
|
||||||
#: library/ctypes.rst:1694
|
#: library/ctypes.rst:1694
|
||||||
msgid ""
|
msgid ""
|
||||||
"Create a C callable function (a callback function) from a Python *callable*."
|
"Create a C callable function (a callback function) from a Python *callable*."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"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
|
#: library/ctypes.rst:1701
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -2306,6 +2337,11 @@ msgid ""
|
||||||
"exported function as string, or the ordinal of the exported function as "
|
"exported function as string, or the ordinal of the exported function as "
|
||||||
"small integer. The second item is the shared library instance."
|
"small integer. The second item is the shared library instance."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Renvoie une fonction externe exposée par une bibliothèque partagée. "
|
||||||
|
"*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."
|
||||||
|
|
||||||
#: library/ctypes.rst:1711
|
#: library/ctypes.rst:1711
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -2314,6 +2350,11 @@ msgid ""
|
||||||
"is name of the COM method. *iid* is an optional pointer to the interface "
|
"is name of the COM method. *iid* is an optional pointer to the interface "
|
||||||
"identifier which is used in extended error reporting."
|
"identifier which is used in extended error reporting."
|
||||||
msgstr ""
|
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
|
#: library/ctypes.rst:1716
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -2321,28 +2362,39 @@ msgid ""
|
||||||
"COM interface as first argument, in addition to those parameters that are "
|
"COM interface as first argument, in addition to those parameters that are "
|
||||||
"specified in the :attr:`argtypes` tuple."
|
"specified in the :attr:`argtypes` tuple."
|
||||||
msgstr ""
|
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
|
#: library/ctypes.rst:1720
|
||||||
msgid ""
|
msgid ""
|
||||||
"The optional *paramflags* parameter creates foreign function wrappers with "
|
"The optional *paramflags* parameter creates foreign function wrappers with "
|
||||||
"much more functionality than the features described above."
|
"much more functionality than the features described above."
|
||||||
msgstr ""
|
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
|
#: library/ctypes.rst:1723
|
||||||
msgid "*paramflags* must be a tuple of the same length as :attr:`argtypes`."
|
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
|
#: library/ctypes.rst:1725
|
||||||
msgid ""
|
msgid ""
|
||||||
"Each item in this tuple contains further information about a parameter, it "
|
"Each item in this tuple contains further information about a parameter, it "
|
||||||
"must be a tuple containing one, two, or three items."
|
"must be a tuple containing one, two, or three items."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Chaque élément de ce *n*-uplet contient des informations supplémentaires sur "
|
||||||
|
"le paramètre correspondant. Ce doit être aussi un *n*-uplet, avec un, deux "
|
||||||
|
"ou trois éléments."
|
||||||
|
|
||||||
#: library/ctypes.rst:1728
|
#: library/ctypes.rst:1728
|
||||||
msgid ""
|
msgid ""
|
||||||
"The first item is an integer containing a combination of direction flags for "
|
"The first item is an integer containing a combination of direction flags for "
|
||||||
"the parameter:"
|
"the parameter:"
|
||||||
msgstr ""
|
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
|
#: library/ctypes.rst:1732
|
||||||
msgid "1"
|
msgid "1"
|
||||||
|
@ -2350,7 +2402,7 @@ msgstr "1"
|
||||||
|
|
||||||
#: library/ctypes.rst:1732
|
#: library/ctypes.rst:1732
|
||||||
msgid "Specifies an input parameter to the function."
|
msgid "Specifies an input parameter to the function."
|
||||||
msgstr ""
|
msgstr "Paramètre d'entrée."
|
||||||
|
|
||||||
#: library/ctypes.rst:1735
|
#: library/ctypes.rst:1735
|
||||||
msgid "2"
|
msgid "2"
|
||||||
|
@ -2358,7 +2410,7 @@ msgstr "2"
|
||||||
|
|
||||||
#: library/ctypes.rst:1735
|
#: library/ctypes.rst:1735
|
||||||
msgid "Output parameter. The foreign function fills in a value."
|
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
|
#: library/ctypes.rst:1738
|
||||||
msgid "4"
|
msgid "4"
|
||||||
|
@ -2366,17 +2418,21 @@ msgstr "4"
|
||||||
|
|
||||||
#: library/ctypes.rst:1738
|
#: library/ctypes.rst:1738
|
||||||
msgid "Input parameter which defaults to the integer zero."
|
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
|
#: library/ctypes.rst:1740
|
||||||
msgid ""
|
msgid ""
|
||||||
"The optional second item is the parameter name as string. If this is "
|
"The optional second item is the parameter name as string. If this is "
|
||||||
"specified, the foreign function can be called with named parameters."
|
"specified, the foreign function can be called with named parameters."
|
||||||
msgstr ""
|
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
|
#: library/ctypes.rst:1743
|
||||||
msgid "The optional third item is the default value for this parameter."
|
msgid "The optional third item is the default value for this parameter."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Le troisième élément (optionnel) est la valeur par défaut du paramètre."
|
||||||
|
|
||||||
#: library/ctypes.rst:1745
|
#: library/ctypes.rst:1745
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -2384,14 +2440,20 @@ msgid ""
|
||||||
"so that it supports default parameters and named arguments. The C "
|
"so that it supports default parameters and named arguments. The C "
|
||||||
"declaration from the windows header file is this::"
|
"declaration from the windows header file is this::"
|
||||||
msgstr ""
|
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
|
#: library/ctypes.rst:1779
|
||||||
msgid "Here is the wrapping with :mod:`ctypes`::"
|
msgid "Here is the wrapping with :mod:`ctypes`::"
|
||||||
msgstr ""
|
msgstr "L'encapsulation :mod:`ctypes` correspondante est alors ::"
|
||||||
|
|
||||||
#: library/ctypes.rst:1764
|
#: library/ctypes.rst:1764
|
||||||
msgid "The ``MessageBox`` foreign function can now be called in these ways::"
|
msgid "The ``MessageBox`` foreign function can now be called in these ways::"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"La fonction ``MessageBox`` peut désormais être appelée des manières "
|
||||||
|
"suivantes ::"
|
||||||
|
|
||||||
#: library/ctypes.rst:1770
|
#: library/ctypes.rst:1770
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -2400,6 +2462,9 @@ msgid ""
|
||||||
"copying them into ``RECT`` structure that the caller has to supply. Here is "
|
"copying them into ``RECT`` structure that the caller has to supply. Here is "
|
||||||
"the C declaration::"
|
"the C declaration::"
|
||||||
msgstr ""
|
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
|
#: library/ctypes.rst:1788
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -2408,6 +2473,11 @@ msgid ""
|
||||||
"parameter values when there are more than one, so the GetWindowRect function "
|
"parameter values when there are more than one, so the GetWindowRect function "
|
||||||
"now returns a RECT instance, when called."
|
"now returns a RECT instance, when called."
|
||||||
msgstr ""
|
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
|
#: library/ctypes.rst:1793
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -2417,6 +2487,11 @@ msgid ""
|
||||||
"function could do the error checking, and raises an exception when the api "
|
"function could do the error checking, and raises an exception when the api "
|
||||||
"call failed::"
|
"call failed::"
|
||||||
msgstr ""
|
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
|
#: library/ctypes.rst:1806
|
||||||
msgid ""
|
msgid ""
|
||||||
|
@ -2426,6 +2501,12 @@ msgid ""
|
||||||
"instead of a ``RECT`` instance, you can retrieve the fields in the function "
|
"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::"
|
"and return them instead, the normal processing will no longer take place::"
|
||||||
msgstr ""
|
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
|
#: library/ctypes.rst:1825
|
||||||
msgid "Utility functions"
|
msgid "Utility functions"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user