From 3003ffe828dc8ff74e15ca68bd34c05909c034b2 Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Sat, 13 Jun 2020 08:34:01 -0500 Subject: [PATCH 01/34] Traducido archivo library/ctypes.po --- TRANSLATORS | 1 + library/ctypes.po | 1273 ++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 1142 insertions(+), 132 deletions(-) diff --git a/TRANSLATORS b/TRANSLATORS index bf00c37ed9..097f5bdc7a 100644 --- a/TRANSLATORS +++ b/TRANSLATORS @@ -8,6 +8,7 @@ Raúl Cumplido (@raulcd) Carlos Joel Delgado Pizarro (@c0x6a) Nicolás Demarchi (@gilgamezh) Xavi Francisco (@srxavi) +Sergio Infante (@neosergio) Manuel Kaufmann (@humitos) Alvar Maciel (@alvarmaciel @amaciel) Cristián Maureira-Fredes (@cmaureir) diff --git a/library/ctypes.po b/library/ctypes.po index 56adbd4b3a..ed8bd9bc1d 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -6,23 +6,24 @@ # Check https://github.com/PyCampES/python-docs-es/blob/3.8/TRANSLATORS to # get the list of volunteers # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-05-05 12:54+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2020-06-13 08:16-0500\n" "Language-Team: python-doc-es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.8.0\n" +"Last-Translator: \n" +"X-Generator: Poedit 2.3.1\n" +"Language: es\n" #: ../Doc/library/ctypes.rst:2 msgid ":mod:`ctypes` --- A foreign function library for Python" -msgstr "" +msgstr ":mod:`ctypes` — Una biblioteca de función foraneas para Python" #: ../Doc/library/ctypes.rst:11 msgid "" @@ -30,10 +31,14 @@ msgid "" "compatible data types, and allows calling functions in DLLs or shared " "libraries. It can be used to wrap these libraries in pure Python." msgstr "" +":mod:'ctypes' es una biblioteca de funciones foraneas para Python. " +"Proporciona tipos de datos compatibles con C y permite llamar a funciones en " +"archivos DLL o bibliotecas compartidas. Se puede utilizar para envolver " +"estas bibliotecas en Python puro." #: ../Doc/library/ctypes.rst:19 msgid "ctypes tutorial" -msgstr "" +msgstr "tutorial ctypes" #: ../Doc/library/ctypes.rst:21 msgid "" @@ -41,6 +46,10 @@ msgid "" "they actually work. Since some code samples behave differently under Linux, " "Windows, or Mac OS X, they contain doctest directives in comments." msgstr "" +"Nota: Los ejemplos de código de este tutorial utilizan :mod:'doctest' para " +"asegurarse de que realmente funcionan. Dado que algunos ejemplos de código " +"se comportan de manera diferente en Linux, Windows o Mac OS X, contienen " +"directivas de prueba en los comentarios." #: ../Doc/library/ctypes.rst:25 msgid "" @@ -49,16 +58,23 @@ 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 "" +"Nota: Algunos ejemplos de código hacen referencia al tipo ctypes :" +"class:'c_int'. En las plataformas donde ''sizeof(long) á sizeof(int)'' es " +"un alias de :class:'c_long'. Por lo tanto, no debe confundirse si :" +"class:'c_long' se imprime si espera :class:'c_int' --- son en realidad del " +"mismo tipo." #: ../Doc/library/ctypes.rst:33 msgid "Loading dynamic link libraries" -msgstr "" +msgstr "Carga de bibliotecas de enlaces dinámicos" #: ../Doc/library/ctypes.rst:35 msgid "" ":mod:`ctypes` exports the *cdll*, and on Windows *windll* and *oledll* " "objects, for loading dynamic link libraries." msgstr "" +":mod:'ctypes' exporta los objetos *cdll* y en Windows *windll* y *oledll*, " +"para cargar bibliotecas de vínculos dinámicos." #: ../Doc/library/ctypes.rst:38 msgid "" @@ -70,12 +86,22 @@ msgid "" "error code is used to automatically raise an :class:`OSError` exception when " "the function call fails." msgstr "" +"Las bibliotecas se cargan accediendo a ellas como atributos de estos " +"objetos. *cdll* carga bibliotecas que exportan funciones utilizando la " +"convención de llamada estándar ''cdecl'', mientras que las bibliotecas " +"*windll* llaman a funciones mediante la convención de llamada ''stdcall''. " +"*oledll* también utiliza la convención de llamada ''stdcall'' y asume que " +"las funciones devuelven un código de error Windows :c:type:'HRESULT'. El " +"código de error se utiliza para generar automáticamente una excepción :" +"class:'OSError' cuando se produce un error en la llamada a la función." #: ../Doc/library/ctypes.rst:46 msgid "" "Windows errors used to raise :exc:`WindowsError`, which is now an alias of :" "exc:`OSError`." msgstr "" +"Errores de Windows utilizados para generar :exc:'WindowsError', que ahora es " +"un alias de :exc:'OSError'." #: ../Doc/library/ctypes.rst:51 msgid "" @@ -83,10 +109,13 @@ msgid "" "C library containing most standard C functions, and uses the cdecl calling " "convention::" msgstr "" +"Estos son algunos ejemplos para Windows. Tener en cuenta que ''msvcrt'' es " +"la biblioteca estándar de MS C que contiene la mayoría de las funciones C " +"estándar y utiliza la convención de llamada cdecl::" #: ../Doc/library/ctypes.rst:63 msgid "Windows appends the usual ``.dll`` file suffix automatically." -msgstr "" +msgstr "Windows agrega la extensión usual ``.dll`` automáticamente." #: ../Doc/library/ctypes.rst:66 msgid "" @@ -95,6 +124,10 @@ msgid "" "used by Python. Where possible, use native Python functionality, or else " "import and use the ``msvcrt`` module." msgstr "" +"Acceder a la biblioteca estándar de C a través de ``cdll.msvcrt`` utilizará " +"una versión obsoleta de la biblioteca que puede ser incompatible con la " +"utilizada por Python. Cuando sea posible, use la funcionalidad nativa de " +"Python, o bien importe y use el módulo ``msvcrt``." #: ../Doc/library/ctypes.rst:71 msgid "" @@ -104,14 +137,19 @@ msgid "" "you should load the library by creating an instance of CDLL by calling the " "constructor::" msgstr "" +"En Linux, se requiere especificar el nombre de archivo *incluyendo* la " +"extensión para cargar una biblioteca, por lo que no se puede utilizar el " +"acceso por atributos para cargar las bibliotecas. Se debe usar el método :" +"meth:`LoadLibrary` de los cargadores de dll, o se debe cargar la biblioteca " +"creando una instancia de CDLL llamando al constructor::" #: ../Doc/library/ctypes.rst:89 msgid "Accessing functions from loaded dlls" -msgstr "" +msgstr "Acceder a las funciones de los dll cargados" #: ../Doc/library/ctypes.rst:91 msgid "Functions are accessed as attributes of dll objects::" -msgstr "" +msgstr "Las funciones se acceden como atributos de los objetos dll::" #: ../Doc/library/ctypes.rst:106 msgid "" @@ -123,6 +161,13 @@ msgid "" "following C prototype, and a macro is used to expose one of them as " "``GetModuleHandle`` depending on whether UNICODE is defined or not::" msgstr "" +"Nótese que las dlls del sistema win32 como ``kernel32`` y ``user32`` a " +"menudo exportan versiones ANSI y UNICODE de una función. La versión UNICODE " +"se exporta con una ``W`` añadida al nombre, mientras que la versión ANSI se " +"exporta con una ``A`` añadida al nombre. La función ``GetModuleHandle`` de " +"win32, que devuelve un *manejador de módulo* para un nombre de módulo dado, " +"tiene el siguiente prototipo de C, y se usa una macro para exponer uno de " +"ellos como ``GetModuleHandle`` dependiendo de si UNICODE está definido o no::" #: ../Doc/library/ctypes.rst:119 msgid "" @@ -130,6 +175,10 @@ msgid "" "version you need by specifying ``GetModuleHandleA`` or ``GetModuleHandleW`` " "explicitly, and then call it with bytes or string objects respectively." msgstr "" +"*windll* no intenta seleccionar una de ellas por arte de magia, se debe " +"acceder a la versión que se necesita especificando ``GetModuleHandleA`` o " +"``GetModuleHandleW`` explícitamente, y luego llamarlo con bytes u objetos de " +"cadena respectivamente." #: ../Doc/library/ctypes.rst:123 msgid "" @@ -137,6 +186,9 @@ msgid "" "identifiers, like ``\"??2@YAPAXI@Z\"``. In this case you have to use :func:" "`getattr` to retrieve the function::" msgstr "" +"A veces, las dlls exportan funciones con nombres que no son identificadores " +"válidos de Python, como ``”??2@YAPAXI@Z”``. En este caso tienes que usar :" +"func:`getattr` para recuperar la función::" #: ../Doc/library/ctypes.rst:131 msgid "" @@ -144,10 +196,13 @@ msgid "" "functions can be accessed by indexing the dll object with the ordinal " "number::" msgstr "" +"En Windows, algunas dlls exportan funciones no por nombre sino por ordinal. " +"Se pueden acceder a estas funciones indexando el objeto dll con el número " +"ordinal::" #: ../Doc/library/ctypes.rst:148 msgid "Calling functions" -msgstr "" +msgstr "Funciones de llamada" #: ../Doc/library/ctypes.rst:150 msgid "" @@ -156,24 +211,34 @@ msgid "" "Unix epoch, and the ``GetModuleHandleA()`` function, which returns a win32 " "module handle." msgstr "" +"Puedes llamar a estas funciones como cualquier otra funcion en Python. Este " +"ejemplo utiliza la función ``time()``, que devuelve el tiempo del sistema en " +"segundos desde la época de Unix, y la función ``GetModuleHandleA()``, que " +"devuelve un manejador de módulo de win32." #: ../Doc/library/ctypes.rst:155 msgid "" "This example calls both functions with a ``NULL`` pointer (``None`` should " "be used as the ``NULL`` pointer)::" msgstr "" +"Este ejemplo llama a ambas funciones con un puntero ``NULL`` (``None`` debe " +"ser usado como el puntero ``NULL``)::" #: ../Doc/library/ctypes.rst:164 msgid "" ":exc:`ValueError` is raised when you call an ``stdcall`` function with the " "``cdecl`` calling convention, or vice versa::" msgstr "" +":exc:`ValueError` es lanzado cuando se llama a una función ``stdcall`` con " +"la convención de llamada ``cdecl``, o viceversa::" #: ../Doc/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." msgstr "" +"Para saber la convención de llamada correcta, hay que mirar en el archivo de " +"encabezado C o en la documentación de la función que se quiere llamar." #: ../Doc/library/ctypes.rst:182 msgid "" @@ -181,6 +246,9 @@ msgid "" "prevent crashes from general protection faults when functions are called " "with invalid argument values::" msgstr "" +"En Windows, :mod:`ctypes` utiliza la gestión de excepciones estructurada de " +"win32 para evitar que se produzcan fallos de protección general cuando se " +"llaman funciones con valores de argumento inválidos::" #: ../Doc/library/ctypes.rst:192 msgid "" @@ -189,6 +257,10 @@ msgid "" "debugging crashes (e.g. from segmentation faults produced by erroneous C " "library calls)." msgstr "" +"Sin embargo, hay suficientes maneras de bloquear Python con :mod:``ctypes``, " +"así que debes tener cuidado de todos modos. El módulo :mod:`faulthandler` " +"puede ser útil para depurar bloqueos (por ejemplo, provenientes de fallos de " +"segmentación producidos por llamadas erróneas a la biblioteca C)." #: ../Doc/library/ctypes.rst:197 msgid "" @@ -200,72 +272,83 @@ msgid "" "platforms default C :c:type:`int` type, their value is masked to fit into " "the C type." msgstr "" +"Los objetos ``None``, enteros, bytes y cadenas (unicode) son los únicos " +"objetos nativos de Python que pueden ser usados directamente como parámetros " +"en estas llamadas a funciones. ``None`` se pasa como puntero de C ``NULL``, " +"los objetos bytes y las cadenas se pasan como puntero al bloque de memoria " +"que contiene sus datos (:c:type:`char *` o :c:type:`wchar_t *`). Los " +"enteros de Python se pasan como por defecto en la plataforma como tipo :c:" +"type:`int` de C, su valor se enmascara para que encuadre en el tipo C." #: ../Doc/library/ctypes.rst:204 msgid "" "Before we move on calling functions with other parameter types, we have to " "learn more about :mod:`ctypes` data types." msgstr "" +"Antes de pasar a llamar funciones con otros tipos de parámetros, tenemos que " +"aprender más sobre los tipos de datos :mod:`ctypes`." #: ../Doc/library/ctypes.rst:211 ../Doc/library/ctypes.rst:2128 msgid "Fundamental data types" -msgstr "" +msgstr "Tipos de datos fundamentales" #: ../Doc/library/ctypes.rst:213 msgid ":mod:`ctypes` defines a number of primitive C compatible data types:" msgstr "" +":mod:`ctypes` define un número de tipos de datos primitivos compatibles con " +"C:" #: ../Doc/library/ctypes.rst:216 msgid "ctypes type" -msgstr "" +msgstr "tipo ctypes" #: ../Doc/library/ctypes.rst:216 msgid "C type" -msgstr "" +msgstr "Tipo C" #: ../Doc/library/ctypes.rst:216 msgid "Python type" -msgstr "" +msgstr "Tipo Python" #: ../Doc/library/ctypes.rst:218 msgid ":class:`c_bool`" -msgstr "" +msgstr ":class:`c_bool`" #: ../Doc/library/ctypes.rst:218 msgid ":c:type:`_Bool`" -msgstr "" +msgstr ":c:tipo:`_Bool`" #: ../Doc/library/ctypes.rst:218 msgid "bool (1)" -msgstr "" +msgstr "bool (1)" #: ../Doc/library/ctypes.rst:220 msgid ":class:`c_char`" -msgstr "" +msgstr ":class:`c_char`" #: ../Doc/library/ctypes.rst:220 ../Doc/library/ctypes.rst:224 msgid ":c:type:`char`" -msgstr "" +msgstr ":c:tipo:`char`" #: ../Doc/library/ctypes.rst:220 msgid "1-character bytes object" -msgstr "" +msgstr "Un objeto bytes de 1-caracter" #: ../Doc/library/ctypes.rst:222 msgid ":class:`c_wchar`" -msgstr "" +msgstr ":class:`c_wchar`" #: ../Doc/library/ctypes.rst:222 msgid ":c:type:`wchar_t`" -msgstr "" +msgstr ":c:type:`wchar_t`" #: ../Doc/library/ctypes.rst:222 msgid "1-character string" -msgstr "" +msgstr "Una cadena de 1-caracter" #: ../Doc/library/ctypes.rst:224 msgid ":class:`c_byte`" -msgstr "" +msgstr ":class:`c_byte`" #: ../Doc/library/ctypes.rst:224 ../Doc/library/ctypes.rst:226 #: ../Doc/library/ctypes.rst:228 ../Doc/library/ctypes.rst:230 @@ -274,175 +357,179 @@ msgstr "" #: ../Doc/library/ctypes.rst:240 ../Doc/library/ctypes.rst:242 #: ../Doc/library/ctypes.rst:245 ../Doc/library/ctypes.rst:247 msgid "int" -msgstr "" +msgstr "entero" #: ../Doc/library/ctypes.rst:226 msgid ":class:`c_ubyte`" -msgstr "" +msgstr ":class:`c_ubyte`" #: ../Doc/library/ctypes.rst:226 msgid ":c:type:`unsigned char`" -msgstr "" +msgstr ":c:type:``unigned char`` (no asignado)" #: ../Doc/library/ctypes.rst:228 msgid ":class:`c_short`" -msgstr "" +msgstr ":class:`c_short`" #: ../Doc/library/ctypes.rst:228 msgid ":c:type:`short`" -msgstr "" +msgstr ":c:type:``short``" #: ../Doc/library/ctypes.rst:230 msgid ":class:`c_ushort`" -msgstr "" +msgstr ":class:`c_ushort`" #: ../Doc/library/ctypes.rst:230 msgid ":c:type:`unsigned short`" -msgstr "" +msgstr ":c:type:``unsigned short``" #: ../Doc/library/ctypes.rst:232 msgid ":class:`c_int`" -msgstr "" +msgstr ":class:`c_int`" #: ../Doc/library/ctypes.rst:232 msgid ":c:type:`int`" -msgstr "" +msgstr ":c:type:``int``" #: ../Doc/library/ctypes.rst:234 msgid ":class:`c_uint`" -msgstr "" +msgstr ":class:`c_uint`" #: ../Doc/library/ctypes.rst:234 msgid ":c:type:`unsigned int`" -msgstr "" +msgstr ":c:type:``unsigned int``" #: ../Doc/library/ctypes.rst:236 msgid ":class:`c_long`" -msgstr "" +msgstr ":clase:`c_long`" #: ../Doc/library/ctypes.rst:236 msgid ":c:type:`long`" -msgstr "" +msgstr ":c:tipo:`long`" #: ../Doc/library/ctypes.rst:238 msgid ":class:`c_ulong`" -msgstr "" +msgstr ":clase:`c_ulong`" #: ../Doc/library/ctypes.rst:238 msgid ":c:type:`unsigned long`" -msgstr "" +msgstr ":c:type:``unsigned long``" #: ../Doc/library/ctypes.rst:240 msgid ":class:`c_longlong`" -msgstr "" +msgstr ":class:`c_longlong`" #: ../Doc/library/ctypes.rst:240 msgid ":c:type:`__int64` or :c:type:`long long`" -msgstr "" +msgstr ":c:type:`__int64` o :c:type:`long long`" #: ../Doc/library/ctypes.rst:242 msgid ":class:`c_ulonglong`" -msgstr "" +msgstr ":clase:`c_ulonglong`" #: ../Doc/library/ctypes.rst:242 msgid ":c:type:`unsigned __int64` or :c:type:`unsigned long long`" -msgstr "" +msgstr ":c:tipo:`unsigned __int64` o :c:tipo:`unsigned long long`" #: ../Doc/library/ctypes.rst:245 msgid ":class:`c_size_t`" -msgstr "" +msgstr ":class:`c_size_t`" #: ../Doc/library/ctypes.rst:245 msgid ":c:type:`size_t`" -msgstr "" +msgstr ":c:type:`size_t`" #: ../Doc/library/ctypes.rst:247 msgid ":class:`c_ssize_t`" -msgstr "" +msgstr ":class:`c_ssize_t`" #: ../Doc/library/ctypes.rst:247 msgid ":c:type:`ssize_t` or :c:type:`Py_ssize_t`" -msgstr "" +msgstr ":c:type:`ssize_t` o :c:type:`Py_ssize_t`" #: ../Doc/library/ctypes.rst:250 msgid ":class:`c_float`" -msgstr "" +msgstr ":class:`c_float`" #: ../Doc/library/ctypes.rst:250 msgid ":c:type:`float`" -msgstr "" +msgstr ":c:type:`float`" #: ../Doc/library/ctypes.rst:250 ../Doc/library/ctypes.rst:252 #: ../Doc/library/ctypes.rst:254 msgid "float" -msgstr "" +msgstr "flotante" #: ../Doc/library/ctypes.rst:252 msgid ":class:`c_double`" -msgstr "" +msgstr ":class:`c_double`" #: ../Doc/library/ctypes.rst:252 msgid ":c:type:`double`" -msgstr "" +msgstr ":c:type:`double`" #: ../Doc/library/ctypes.rst:254 msgid ":class:`c_longdouble`" -msgstr "" +msgstr ":class:`c_longdouble`" #: ../Doc/library/ctypes.rst:254 msgid ":c:type:`long double`" -msgstr "" +msgstr ":c:type:`long double`" #: ../Doc/library/ctypes.rst:256 msgid ":class:`c_char_p`" -msgstr "" +msgstr ":class:`c_char_p`" #: ../Doc/library/ctypes.rst:256 msgid ":c:type:`char *` (NUL terminated)" -msgstr "" +msgstr ":c:type:`char *` (NUL terminated)" #: ../Doc/library/ctypes.rst:256 msgid "bytes object or ``None``" -msgstr "" +msgstr "objecto de bytes o ``None``" #: ../Doc/library/ctypes.rst:258 msgid ":class:`c_wchar_p`" -msgstr "" +msgstr ":class:`c_wchar_p`" #: ../Doc/library/ctypes.rst:258 msgid ":c:type:`wchar_t *` (NUL terminated)" -msgstr "" +msgstr ":c:type:`wchar_t *` (NUL terminated)" #: ../Doc/library/ctypes.rst:258 msgid "string or ``None``" -msgstr "" +msgstr "cadena o ``None``" #: ../Doc/library/ctypes.rst:260 msgid ":class:`c_void_p`" -msgstr "" +msgstr ":class:`c_void_p`" #: ../Doc/library/ctypes.rst:260 msgid ":c:type:`void *`" -msgstr "" +msgstr ":c:type:`void *`" #: ../Doc/library/ctypes.rst:260 msgid "int or ``None``" -msgstr "" +msgstr "entero o ``None``" #: ../Doc/library/ctypes.rst:264 msgid "The constructor accepts any object with a truth value." -msgstr "" +msgstr "El constructor acepta cualquier objeto con valor verdadero." #: ../Doc/library/ctypes.rst:266 msgid "" "All these types can be created by calling them with an optional initializer " "of the correct type and value::" msgstr "" +"Todos estos tipos pueden ser creados llamándolos con un inicializador " +"opcional del tipo y valor correctos::" #: ../Doc/library/ctypes.rst:277 msgid "" "Since these types are mutable, their value can also be changed afterwards::" msgstr "" +"Dado que estos tipos son mutables, su valor también puede ser cambiado " +"después::" #: ../Doc/library/ctypes.rst:289 msgid "" @@ -451,6 +538,10 @@ msgid "" "point to, *not the contents* of the memory block (of course not, because " "Python bytes objects are immutable)::" msgstr "" +"Asignando un nuevo valor a las instancias de los tipos de punteros :class:" +"`c_char_p`, :class:`c_wchar_p`, y :class:`c_void_p` cambia el *lugar de " +"memoria* al que apuntan, *no el contenido* del bloque de memoria (por " +"supuesto que no, porque los objetos de bytes de Python son inmutables)::" #: ../Doc/library/ctypes.rst:309 msgid "" @@ -461,6 +552,12 @@ msgid "" "``raw`` property; if you want to access it as NUL terminated string, use the " "``value`` property::" msgstr "" +"Sin embargo, debe tener cuidado de no pasarlos a funciones que esperan " +"punteros a la memoria mutable. Si necesitas bloques de memoria mutables, " +"ctypes tiene una función :func:`create_string_buffer` que los crea de varias " +"maneras. El contenido actual del bloque de memoria puede ser accedido (o " +"cambiado) con la propiedad ``raw``; si quieres acceder a él como cadena " +"terminada NUL, usa la propiedad ``value``::" #: ../Doc/library/ctypes.rst:333 msgid "" @@ -470,10 +567,15 @@ msgid "" "memory block containing unicode characters of the C type :c:type:`wchar_t` " "use the :func:`create_unicode_buffer` function." msgstr "" +"La función :func:`create_string_buffer` reemplaza a la función :func:" +"`c_buffer` (que todavía está disponible como un alias), así como a la " +"función :func:`c_string` de versiones anteriores de ctypes. Para crear un " +"bloque de memoria mutable que contenga caracteres unicode del tipo C :c:type:" +"`wchar_t` utilice la función :func:`create_unicode_buffer`." #: ../Doc/library/ctypes.rst:343 msgid "Calling functions, continued" -msgstr "" +msgstr "Funciones de llamada, continuación" #: ../Doc/library/ctypes.rst:345 msgid "" @@ -481,6 +583,9 @@ msgid "" "`sys.stdout`, so these examples will only work at the console prompt, not " "from within *IDLE* or *PythonWin*::" msgstr "" +"Note que printf imprime al canal de salida estándar real, *no* a :data:`sys." +"stdout`, por lo que estos ejemplos sólo funcionarán en el prompt de la " +"consola, no desde dentro de *IDLE* o *PythonWin*::" #: ../Doc/library/ctypes.rst:365 msgid "" @@ -488,10 +593,14 @@ 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 "" +"Como se ha mencionado antes, todos los tipos de Python, excepto los enteros, " +"cadenas y objetos bytes, tienen que ser envueltos en su correspondiente " +"tipo :mod:`ctypes`, para que puedan ser convertidos al tipo de datos C " +"requerido::" #: ../Doc/library/ctypes.rst:378 msgid "Calling functions with your own custom data types" -msgstr "" +msgstr "Funciones de llamada con sus propios tipos de datos personalizados" #: ../Doc/library/ctypes.rst:380 msgid "" @@ -500,6 +609,11 @@ msgid "" "an :attr:`_as_parameter_` attribute and uses this as the function argument. " "Of course, it must be one of integer, string, or bytes::" msgstr "" +"También puedes personalizar la conversión de argumentos de :mod:`ctypes` " +"para permitir que las instancias de tus propias clases se usen como " +"argumentos de función. :mod:`ctypes` busca un atributo :attr:" +"`_como_parámetro_` y lo usa como argumento de función. Por supuesto, debe " +"ser uno de entero, cadena o bytes::" #: ../Doc/library/ctypes.rst:395 msgid "" @@ -507,16 +621,22 @@ msgid "" "instance variable, you could define a :class:`property` which makes the " "attribute available on request." msgstr "" +"Si no quieres almacenar los datos de la instancia en la variable de " +"instancia :attr:`_as_parameter_`, puedes definir una :class:``property` que " +"haga que el atributo esté disponible a petición." #: ../Doc/library/ctypes.rst:403 msgid "Specifying the required argument types (function prototypes)" msgstr "" +"Especificar los tipos de argumentos requeridos (prototipos de funciones)" #: ../Doc/library/ctypes.rst:405 msgid "" "It is possible to specify the required argument types of functions exported " "from DLLs by setting the :attr:`argtypes` attribute." msgstr "" +"Es posible especificar los tipos de argumentos necesarios de las funciones " +"exportadas desde las DLL estableciendo el atributo :attr:`argtypes`." #: ../Doc/library/ctypes.rst:408 msgid "" @@ -525,6 +645,11 @@ msgid "" "different types of parameters depending on the format string, on the other " "hand this is quite handy to experiment with this feature)::" msgstr "" +":attr:`argtypes` debe ser una secuencia de tipos de datos de C (la función " +"``printf`` probablemente no es un buen ejemplo aquí, porque toma un número " +"variable y diferentes tipos de parámetros dependiendo del formato de la " +"cadena, por otro lado esto es bastante útil para experimentar con esta " +"característica)::" #: ../Doc/library/ctypes.rst:419 msgid "" @@ -532,6 +657,9 @@ msgid "" "prototype for a C function), and tries to convert the arguments to valid " "types::" msgstr "" +"La especificación de un formato protege contra los tipos de argumentos " +"incompatibles (al igual que un prototipo para una función C), e intenta " +"convertir los argumentos en tipos válidos::" #: ../Doc/library/ctypes.rst:431 msgid "" @@ -545,10 +673,20 @@ msgid "" "the result should be an integer, string, bytes, a :mod:`ctypes` instance, or " "an object with an :attr:`_as_parameter_` attribute." msgstr "" +"Si has definido tus propias clases las cuales pasas a las llamadas a " +"funciones, tienes que implementar un método de clase :meth:`from_param` para " +"que puedan ser usadas en la secuencia :attr:`argtypes`. El método de clase :" +"meth:`from_param` recibe el objeto Python que se le pasa a la llamada a " +"función, debería hacer una comprobación de tipo o lo que sea necesario para " +"asegurarse de que este objeto es aceptable, y luego devolver el objeto en " +"sí, su atributo :attr:`_as_parameter_`, o lo que se quiera pasar como " +"argumento de la función C en este caso. De nuevo, el resultado debe ser un " +"entero, una cadena, unos bytes, una instancia :mod:`ctypes`, o un objeto con " +"el atributo :attr:`__as_parameter_`." #: ../Doc/library/ctypes.rst:445 msgid "Return types" -msgstr "" +msgstr "Tipos de retorno" #: ../Doc/library/ctypes.rst:447 msgid "" @@ -556,12 +694,17 @@ msgid "" "return types can be specified by setting the :attr:`restype` attribute of " "the function object." msgstr "" +"Por defecto, se supone que las funciones devuelven el tipo C :c:type:`int`. " +"Se pueden especificar otros tipos de retorno estableciendo el atributo :attr:" +"`restype` del objeto de la función." #: ../Doc/library/ctypes.rst:451 msgid "" "Here is a more advanced example, it uses the ``strchr`` function, which " "expects a string pointer and a char, and returns a pointer to a string::" msgstr "" +"Aquí hay un ejemplo más avanzado, utiliza la función``strchr``, que espera " +"un puntero de cadena y un carácter, y devuelve un puntero a una cadena::" #: ../Doc/library/ctypes.rst:464 msgid "" @@ -569,6 +712,9 @@ msgid "" "`argtypes` attribute, and the second argument will be converted from a " "single character Python bytes object into a C char::" msgstr "" +"Si quieres evitar las llamadas ``ord(\"x\")`` de arriba, puedes establecer " +"el atributo :attr:`argtypes`, y el segundo argumento se convertirá de un " +"objeto de un solo carácter de bytes de Python a un char::" #: ../Doc/library/ctypes.rst:482 msgid "" @@ -579,6 +725,12 @@ msgid "" "function call. This is useful to check for error return values and " "automatically raise an exception::" msgstr "" +"También puedes usar un objeto Python llamable (una función o una clase, por " +"ejemplo) como el atributo :attr:`restype`, si la función foranea devuelve un " +"número entero. El objeto llamable será llamado con el *entero* que la " +"función C devuelve, y el resultado de esta llamada será utilizado como " +"resultado de la llamada a la función. Esto es útil para comprobar si hay " +"valores de retorno de error y plantear automáticamente una excepción::" #: ../Doc/library/ctypes.rst:505 msgid "" @@ -587,16 +739,24 @@ msgid "" "exception. ``WinError`` takes an optional error code parameter, if no one is " "used, it calls :func:`GetLastError` to retrieve it." msgstr "" +"\"WinError\" es una función que llamará a la api Windows \"FormatMessage\" " +"para obtener la representación de la cadena de un código de error, y " +"devolverá una excepción. ``WinError`` toma un parámetro de código de error " +"opcional, si no se usa ninguno, llama a :func:`GetLastError`` para " +"recuperarlo." #: ../Doc/library/ctypes.rst:510 msgid "" "Please note that a much more powerful error checking mechanism is available " "through the :attr:`errcheck` attribute; see the reference manual for details." msgstr "" +"Tenga en cuenta que un mecanismo de comprobación de errores mucho más " +"potente está disponible a través del atributo :attr:`errcheck`; consulte el " +"manual de referencia para obtener más detalles." #: ../Doc/library/ctypes.rst:517 msgid "Passing pointers (or: passing parameters by reference)" -msgstr "" +msgstr "Pasar los punteros (o: pasar los parámetros por referencia)" #: ../Doc/library/ctypes.rst:519 msgid "" @@ -605,6 +765,10 @@ msgid "" "large to be passed by value. This is also known as *passing parameters by " "reference*." msgstr "" +"A veces una función api C espera un *puntero* a un tipo de datos como " +"parámetro, probablemente para escribir en el lugar correspondiente, o si los " +"datos son demasiado grandes para ser pasados por valor. Esto también se " +"conoce cómo *pasar parámetros por referencia*." #: ../Doc/library/ctypes.rst:523 msgid "" @@ -614,10 +778,15 @@ msgid "" "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` exporta la función :func:`byref` que se utiliza para pasar " +"parámetros por referencia. El mismo efecto se puede conseguir con la " +"función :func:`pointer`, aunque :func:`pointer` hace mucho más trabajo ya " +"que construye un objeto puntero real, por lo que es más rápido usar :func:" +"`byref` si no se necesita el objeto puntero en el propio Python::" #: ../Doc/library/ctypes.rst:545 msgid "Structures and unions" -msgstr "" +msgstr "Estructuras y uniones" #: ../Doc/library/ctypes.rst:547 msgid "" @@ -626,12 +795,20 @@ msgid "" "subclass must define a :attr:`_fields_` attribute. :attr:`_fields_` must be " "a list of *2-tuples*, containing a *field name* and a *field type*." msgstr "" +"Las estructuras y uniones deben derivar de las clases base :class:" +"`Structure` y :class:`Union` que se definen en el módulo :mod:`ctypes`. Cada " +"subclase debe definir un atributo :attr:`_fields_`. :attr:`_fields_` debe " +"ser una lista de *2-tuplas*, que contenga un *nombre de campo* y un *tipo de " +"campo*." #: ../Doc/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." msgstr "" +"El tipo de campo debe ser un tipo :mod:`ctypes` como :class:`c_int`, o " +"cualquier otro tipo :mod:`ctypes` derivado: estructura, unión, matriz, " +"puntero." #: ../Doc/library/ctypes.rst:555 msgid "" @@ -639,30 +816,42 @@ msgid "" "named *x* and *y*, and also shows how to initialize a structure in the " "constructor::" msgstr "" +"Aquí hay un ejemplo simple de una estructura POINT, que contiene dos enteros " +"llamados *x* y *y*, y también muestra cómo inicializar una estructura en el " +"constructor::" #: ../Doc/library/ctypes.rst:575 msgid "" "You can, however, build much more complicated structures. A structure can " "itself contain other structures by using a structure as a field type." msgstr "" +"Sin embargo, se pueden construir estructuras mucho más complicadas. Una " +"estructura puede contener por sí misma otras estructuras usando una " +"estructura como tipo de campo." #: ../Doc/library/ctypes.rst:578 msgid "" "Here is a RECT structure which contains two POINTs named *upperleft* and " "*lowerright*::" msgstr "" +"Aquí hay una estructura RECT que contiene dos POINTs llamados *superior " +"izquierda* y *bajo derecha*::" #: ../Doc/library/ctypes.rst:592 msgid "" "Nested structures can also be initialized in the constructor in several " "ways::" msgstr "" +"Las estructuras anidadas también pueden ser inicializadas en el constructor " +"de varias maneras::" #: ../Doc/library/ctypes.rst:597 msgid "" "Field :term:`descriptor`\\s can be retrieved from the *class*, they are " "useful for debugging because they can provide useful information::" msgstr "" +"El campo :term:`descriptor` puede ser recuperado de la *clase*, son útiles " +"para la depuración porque pueden proporcionar información útil::" #: ../Doc/library/ctypes.rst:611 msgid "" @@ -671,10 +860,15 @@ msgid "" "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` no soporta el paso de uniones o estructuras con campos de bits " +"a funciones por valor. Aunque esto puede funcionar en 32-bit x86, la " +"biblioteca no garantiza que funcione en el caso general. Las uniones y " +"estructuras con campos de bits siempre deben pasarse a las funciones por " +"puntero." #: ../Doc/library/ctypes.rst:617 msgid "Structure/union alignment and byte order" -msgstr "" +msgstr "Alineación de estructura/unión y orden de bytes" #: ../Doc/library/ctypes.rst:619 msgid "" @@ -684,6 +878,12 @@ msgid "" "to a positive integer and specifies the maximum alignment for the fields. " "This is what ``#pragma pack(n)`` also does in MSVC." msgstr "" +"Por defecto, los campos de Estructura y Unión están alineados de la misma " +"manera que lo hace el compilador C. Es posible anular este comportamiento " +"especificando un atributo de clase :attr:`_pack_` en la definición de la " +"subclase. Este debe ser establecido como un entero positivo y especifica la " +"alineación máxima de los campos. Esto es lo que ``#pragma pack(n)`` también " +"hace en MSVC." #: ../Doc/library/ctypes.rst:625 msgid "" @@ -693,10 +893,15 @@ msgid "" "`BigEndianUnion`, and :class:`LittleEndianUnion` base classes. These " "classes cannot contain pointer fields." msgstr "" +":mod:``ctypes`` utiliza el orden de bytes nativos para las Estructuras y " +"Uniones. Para construir estructuras con un orden de bytes no nativo, puedes " +"usar una de las clases base :class:`BigEndianStructure`, :class:" +"`LittleEndianStructure`, :class:`BigEndianUnion`, y :class:" +"`LittleEndianUnion`. Estas clases no pueden contener campos puntero." #: ../Doc/library/ctypes.rst:635 msgid "Bit fields in structures and unions" -msgstr "" +msgstr "Campos de bits en estructuras y uniones" #: ../Doc/library/ctypes.rst:637 msgid "" @@ -704,64 +909,81 @@ msgid "" "fields are only possible for integer fields, the bit width is specified as " "the third item in the :attr:`_fields_` tuples::" msgstr "" +"Es posible crear estructuras y uniones que contengan campos de bits. Los " +"campos de bits sólo son posibles para campos enteros, el ancho de bit se " +"especifica como el tercer ítem en las tuplas :attr:`_fields_`::" #: ../Doc/library/ctypes.rst:655 msgid "Arrays" -msgstr "" +msgstr "Arreglos" #: ../Doc/library/ctypes.rst:657 msgid "" "Arrays are sequences, containing a fixed number of instances of the same " "type." msgstr "" +"Los arreglos son secuencias, que contienen un número fijo de instancias del " +"mismo tipo." #: ../Doc/library/ctypes.rst:659 msgid "" "The recommended way to create array types is by multiplying a data type with " "a positive integer::" msgstr "" +"La forma recomendada de crear tipos de arreglos es multiplicando un tipo de " +"dato por un entero positivo::" #: ../Doc/library/ctypes.rst:664 msgid "" "Here is an example of a somewhat artificial data type, a structure " "containing 4 POINTs among other stuff::" msgstr "" +"Aquí hay un ejemplo de un tipo de datos algo artificial, una estructura que " +"contiene 4 POINTs entre otras cosas::" #: ../Doc/library/ctypes.rst:680 msgid "Instances are created in the usual way, by calling the class::" -msgstr "" +msgstr "Las instancias se crean de la manera habitual, llamando a la clase::" #: ../Doc/library/ctypes.rst:686 msgid "" "The above code print a series of ``0 0`` lines, because the array contents " "is initialized to zeros." msgstr "" +"El código anterior imprime una serie de líneas ``0 0``, porque el contenido " +"del arreglos se inicializa con ceros." #: ../Doc/library/ctypes.rst:689 msgid "Initializers of the correct type can also be specified::" -msgstr "" +msgstr "También se pueden especificar inicializadores del tipo correcto::" #: ../Doc/library/ctypes.rst:705 msgid "Pointers" -msgstr "" +msgstr "Punteros" #: ../Doc/library/ctypes.rst:707 msgid "" "Pointer instances are created by calling the :func:`pointer` function on a :" "mod:`ctypes` type::" msgstr "" +"Las instancias de puntero se crean llamando a la función :func:`pointer` en " +"un tipo :mod:`ctypes`::" #: ../Doc/library/ctypes.rst:715 msgid "" "Pointer instances have a :attr:`~_Pointer.contents` attribute which returns " "the object to which the pointer points, the ``i`` object above::" msgstr "" +"Las instancias del puntero tienen un atributo :attr:`~_Pointer.contents` que " +"devuelve el objeto al que apunta el puntero, el objeto ``i`` arriba::" #: ../Doc/library/ctypes.rst:722 msgid "" "Note that :mod:`ctypes` does not have OOR (original object return), it " "constructs a new, equivalent object each time you retrieve an attribute::" msgstr "" +"Ten en cuenta que :mod:`ctypes` no tiene OOR (original object return), " +"construye un nuevo objeto equivalente cada vez que recuperas un atributo::" #: ../Doc/library/ctypes.rst:731 msgid "" @@ -769,14 +991,17 @@ msgid "" "attribute would cause the pointer to point to the memory location where this " "is stored::" msgstr "" +"Asignar otra instancia :class:`c_int` al atributo de contenido del puntero " +"causaría que el puntero apunte al lugar de memoria donde se almacena::" #: ../Doc/library/ctypes.rst:743 msgid "Pointer instances can also be indexed with integers::" msgstr "" +"Las instancias de puntero también pueden ser indexadas con números enteros::" #: ../Doc/library/ctypes.rst:749 msgid "Assigning to an integer index changes the pointed to value::" -msgstr "" +msgstr "Asignando a un índice entero cambia el valor señalado::" #: ../Doc/library/ctypes.rst:758 msgid "" @@ -786,6 +1011,11 @@ msgid "" "a C function, and you *know* that the pointer actually points to an array " "instead of a single item." msgstr "" +"También es posible usar índices diferentes de 0, pero debes saber lo que " +"estás haciendo, al igual que en C: Puedes acceder o cambiar arbitrariamente " +"las ubicaciones de memoria. Generalmente sólo usas esta característica si " +"recibes un puntero de una función C, y *sabes* que el puntero en realidad " +"apunta a una matriz en lugar de a un solo elemento." #: ../Doc/library/ctypes.rst:764 msgid "" @@ -794,22 +1024,30 @@ msgid "" "the :func:`POINTER` function, which accepts any :mod:`ctypes` type, and " "returns a new type::" msgstr "" +"Entre bastidores, la función :func:`pointer` hace más que simplemente crear " +"instancias de puntero, tiene que crear primero punteros *tipos*. Esto se " +"hace con la función :func:`POINTER`, que acepta cualquier tipo de :mod:" +"`ctypes`, y devuelve un nuevo tipo::" #: ../Doc/library/ctypes.rst:780 msgid "" "Calling the pointer type without an argument creates a ``NULL`` pointer. " "``NULL`` pointers have a ``False`` boolean value::" msgstr "" +"Llamar al tipo de puntero sin un argumento crea un puntero \"NULL\". Los " +"punteros \"NULL\" tienen un valor booleano falso..:" #: ../Doc/library/ctypes.rst:788 msgid "" ":mod:`ctypes` checks for ``NULL`` when dereferencing pointers (but " "dereferencing invalid non-\\ ``NULL`` pointers would crash Python)::" msgstr "" +"mod:``ctypes`` comprueba si hay ``NULL`` cuando los punteros de referencia " +"(pero los punteros no válidos de referencia ``NULL`` se romperan en Python)::" #: ../Doc/library/ctypes.rst:807 msgid "Type conversions" -msgstr "" +msgstr "Conversiones de tipos" #: ../Doc/library/ctypes.rst:809 msgid "" @@ -821,6 +1059,14 @@ msgid "" "instances instead of pointer types. So, for ``POINTER(c_int)``, ctypes " "accepts an array of c_int::" msgstr "" +"Por lo general, los ctypes hacen un control estricto de los tipos. Esto " +"significa que si tienes ``POINTER(c_int)`` en la lista :attr:`argtypes` de " +"una función o como el tipo de un campo miembro en una definición de " +"estructura, sólo se aceptan instancias exactamente del mismo tipo. Hay " +"algunas excepciones a esta regla, en las que ctypes acepta otros objetos. " +"Por ejemplo, se pueden pasar instancias de arregl compatibles en lugar de " +"tipos de puntero. Así, para ``POINTER(c_int)``, ctypes acepta una matriz de " +"c_int::" #: ../Doc/library/ctypes.rst:830 msgid "" @@ -829,10 +1075,15 @@ msgid "" "pointed type (``c_int`` in this case) can be passed to the function. ctypes " "will apply the required :func:`byref` conversion in this case automatically." msgstr "" +"Además, si se declara explícitamente que un argumento de función es de tipo " +"puntero (como ``POINTER(c_int)``) en :attr:`argtypes`, se puede pasar un " +"objeto de tipo puntero (``c_int`` en este caso) a la función. ctypes " +"aplicará la conversión :func:`byref` requerida en este caso automáticamente." #: ../Doc/library/ctypes.rst:835 msgid "To set a POINTER type field to ``NULL``, you can assign ``None``::" msgstr "" +"Para poner un campo de tipo POINTER a ``NULL``, puedes asignar ``None`::" #: ../Doc/library/ctypes.rst:842 msgid "" @@ -842,10 +1093,15 @@ msgid "" "accepts ``POINTER(c_int)`` pointers or :class:`c_int` arrays for its " "``values`` field, but not instances of other types::" msgstr "" +"A veces se tienen instancias de tipos incompatibles. En C, puedes cambiar " +"un tipo por otro tipo. :mod:`ctypes` proporciona una función :func:`cast` " +"qué puede ser usada de la misma manera. La estructura ``Bar`` definida " +"arriba acepta punteros ``POINTER(c_int)`` o arreglos :class:`c_int`` para su " +"campo ``values``, pero no instancias de otros tipos::" #: ../Doc/library/ctypes.rst:854 msgid "For these cases, the :func:`cast` function is handy." -msgstr "" +msgstr "Para estos casos, la función :func:`cast` es muy útil." #: ../Doc/library/ctypes.rst:856 msgid "" @@ -855,16 +1111,24 @@ msgid "" "ctypes pointer type. It returns an instance of the second argument, which " "references the same memory block as the first argument::" msgstr "" +"La función :func:`cast` puede ser usada para lanzar una instancia ctypes en " +"un puntero a un tipo de datos ctypes diferente. :func:`cast` toma dos " +"parámetros, un objeto ctypes que es o puede ser convertido en un puntero de " +"algún tipo, y un tipo de puntero ctypes. Devuelve una instancia del segundo " +"argumento, que hace referencia al mismo bloque de memoria que el primer " +"argumento::" #: ../Doc/library/ctypes.rst:867 msgid "" "So, :func:`cast` can be used to assign to the ``values`` field of ``Bar`` " "the structure::" msgstr "" +"Así, :func:`cast` puede ser usado para asignar al campo ``values`` de " +"``Bar`` la estructura::" #: ../Doc/library/ctypes.rst:880 msgid "Incomplete Types" -msgstr "" +msgstr "Tipos incompletos" #: ../Doc/library/ctypes.rst:882 msgid "" @@ -872,12 +1136,16 @@ msgid "" "yet specified. In C, they are specified by forward declarations, which are " "defined later::" msgstr "" +"*Los Tipos Incompletos* son estructuras, uniones o matrices cuyos miembros " +"aún no están especificados. En C, se especifican mediante declaraciones a " +"futuro, que se definen más adelante::" #: ../Doc/library/ctypes.rst:893 msgid "" "The straightforward translation into ctypes code would be this, but it does " "not work::" msgstr "" +"La traducción directa al código de ctypes sería esta, pero no funciona::" #: ../Doc/library/ctypes.rst:906 msgid "" @@ -885,22 +1153,30 @@ msgid "" "itself. In :mod:`ctypes`, we can define the ``cell`` class and set the :attr:" "`_fields_` attribute later, after the class statement::" msgstr "" +"porque la nueva ``cell clase`` no está disponible en la propia declaración " +"de clase. En :mod:``ctypes``, podemos definir la clase ``cell`` y establecer " +"el atributo :attr:`_fields_` más tarde, después de la declaración de clase::" #: ../Doc/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::" msgstr "" +"Vamos a intentarlo. Creamos dos instancias de ``cell``, y dejamos que se " +"apunten una a la otra, y finalmente seguimos la cadena de punteros unas " +"cuantas veces::" #: ../Doc/library/ctypes.rst:939 msgid "Callback functions" -msgstr "" +msgstr "Funciones de devolución de llamada" #: ../Doc/library/ctypes.rst:941 msgid "" ":mod:`ctypes` allows creating C callable function pointers from Python " "callables. These are sometimes called *callback functions*." msgstr "" +":mod:`ctypes` permite crear punteros de función llamables C a partir de los " +"llamables de Python. A veces se llaman *funciones de devolución de llamada*." #: ../Doc/library/ctypes.rst:944 msgid "" @@ -908,6 +1184,9 @@ msgid "" "the calling convention, the return type, and the number and types of " "arguments this function will receive." msgstr "" +"Primero, debes crear una clase para la función de devolución de llamada. La " +"clase conoce la convención de llamada, el tipo de retorno, y el número y " +"tipos de argumentos que esta función recibirá." #: ../Doc/library/ctypes.rst:948 msgid "" @@ -916,6 +1195,10 @@ msgid "" "factory function creates types for callback functions using the ``stdcall`` " "calling convention." msgstr "" +"La función de fábrica :func:`CFUNCTYPE`` crea tipos para las funciones de " +"devolución de llamada usando la convención de llamada ``cdecl``. En Windows, " +"la función de fábrica :func:`WINFUNCTYPE` crea tipos para funciones de " +"devolución de llamadas usando la convención de llamadas ``stdcall``." #: ../Doc/library/ctypes.rst:953 msgid "" @@ -923,6 +1206,9 @@ msgid "" "argument, and the callback functions expected argument types as the " "remaining arguments." msgstr "" +"Ambas funciones de fábrica se llaman con el tipo de resultado como primer " +"argumento, y las funciones de llamada de retorno con los tipos de argumentos " +"esperados como los argumentos restantes." #: ../Doc/library/ctypes.rst:957 msgid "" @@ -930,6 +1216,10 @@ msgid "" "`qsort` function, that is used to sort items with the help of a callback " "function. :c:func:`qsort` will be used to sort an array of integers::" msgstr "" +"Presentaré un ejemplo aquí que utiliza la función :c:func:`qsort` de la " +"biblioteca estándar de C, que se utiliza para ordenar los elementos con la " +"ayuda de una función de devolución de llamada. :c:func:`qsort` se utilizará " +"para ordenar un conjunto de números enteros::" #: ../Doc/library/ctypes.rst:967 msgid "" @@ -940,36 +1230,50 @@ msgid "" "is smaller than the second, a zero if they are equal, and a positive integer " "otherwise." msgstr "" +":func:`qsort` debe ser llamada con un puntero a los datos a ordenar, el " +"número de elementos en el array de datos, el tamaño de un elemento, y un " +"puntero a la función de comparación, la llamada de retorno. La llamada de " +"retorno se llamará entonces con dos punteros a los ítems, y debe devolver un " +"entero negativo si el primer ítem es más pequeño que el segundo, un cero si " +"son iguales, y un entero positivo en caso contrario." #: ../Doc/library/ctypes.rst:973 msgid "" "So our callback function receives pointers to integers, and must return an " "integer. First we create the ``type`` for the callback function::" msgstr "" +"Así que nuestra función de devolución de llamada recibe punteros a números " +"enteros, y debe devolver un número entero. Primero creamos el \"tipo\" para " +"la función de devolución de llamada:" #: ../Doc/library/ctypes.rst:979 msgid "" "To get started, here is a simple callback that shows the values it gets " "passed::" msgstr "" +"Para empezar, aquí hay una simple llamada que muestra los valores que se " +"pasan::" #: ../Doc/library/ctypes.rst:989 msgid "The result::" -msgstr "" +msgstr "El resultado::" #: ../Doc/library/ctypes.rst:999 msgid "Now we can actually compare the two items and return a useful result::" -msgstr "" +msgstr "Ahora podemos comparar los dos artículos y obtener un resultado útil::" #: ../Doc/library/ctypes.rst:1014 msgid "As we can easily check, our array is sorted now::" msgstr "" +"Como podemos comprobar fácilmente, nuestro arreglo está ordenado ahora::" #: ../Doc/library/ctypes.rst:1021 msgid "" "The function factories can be used as decorator factories, so we may as well " "write::" msgstr "" +"Las funciones de fabrica pueden ser usadas como decoradores de fabrica, así " +"que podemos escribir::" #: ../Doc/library/ctypes.rst:1039 msgid "" @@ -977,6 +1281,10 @@ 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 "" +"Asegúrate de mantener las referencias a los objetos :func:`CFUNCTYPE` " +"mientras se usen desde el código C. :mod:`ctypes` no lo hace, y si no lo " +"haces, pueden ser basura recolectada, colapsando tu programa cuando se hace " +"una llamada." #: ../Doc/library/ctypes.rst:1043 msgid "" @@ -987,10 +1295,17 @@ msgid "" "with :class:`threading.local` will *not* survive across different callbacks, " "even when those calls are made from the same C thread." msgstr "" +"Además, nótese que si se llama a la función de devolución de llamada en un " +"hilo creado fuera del control de Python (por ejemplo, por el código foraneo " +"que llama a la devolución de llamada), ctypes crea un nuevo hilo Python " +"tonto en cada invocación. Este comportamiento es correcto para la mayoría de " +"los propósitos, pero significa que los valores almacenados con :class:" +"`threading.local` no *sobreviven a través de diferentes llamadas de retorno, " +"incluso cuando esas llamadas se hacen desde el mismo hilo C." #: ../Doc/library/ctypes.rst:1053 msgid "Accessing values exported from dlls" -msgstr "" +msgstr "Acceder a los valores exportados de los dlls" #: ../Doc/library/ctypes.rst:1055 msgid "" @@ -999,6 +1314,10 @@ msgid "" "integer set to 0, 1, or 2, depending on the :option:`-O` or :option:`-OO` " "flag given on startup." msgstr "" +"Algunas bibliotecas compartidas no sólo exportan funciones, sino también " +"variables. Un ejemplo en la propia biblioteca de Python es el :c:data:" +"`Py_OptimizeFlag`, un entero establecido en 0, 1, o 2, dependiendo del flag :" +"option:`-O` o :option:`-OO` dado en el inicio." #: ../Doc/library/ctypes.rst:1060 msgid "" @@ -1006,6 +1325,9 @@ msgid "" "methods of the type. *pythonapi* is a predefined symbol giving access to " "the Python C api::" msgstr "" +":mod:`ctypes` puede acceder a valores como este con los métodos de la clase :" +"meth:`in_dll` del tipo. *pythonapi* es un símbolo predefinido que da acceso " +"a la API de Python C::" #: ../Doc/library/ctypes.rst:1069 msgid "" @@ -1013,16 +1335,21 @@ msgid "" "would have printed ``c_long(1)``, or ``c_long(2)`` if :option:`-OO` would " "have been specified." msgstr "" +"Si el intérprete se hubiera iniciado con :option:`-O`, el ejemplo habría " +"impreso ``c_long(1)``, o ``c_long(2)`` si :option:`-OO` se hubiera " +"especificado." #: ../Doc/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." msgstr "" +"Un ejemplo extendido que también demuestra el uso de punteros accediendo al " +"puntero :c:data:`PyImport_FrozenModules` exportado por Python." #: ../Doc/library/ctypes.rst:1076 msgid "Quoting the docs for that value:" -msgstr "" +msgstr "Citando los documentos para ese valor:" #: ../Doc/library/ctypes.rst:1078 msgid "" @@ -1032,18 +1359,28 @@ msgid "" "could play tricks with this to provide a dynamically created collection of " "frozen modules." msgstr "" +"Este puntero está inicializado para apuntar a un arreglo de registros :c:" +"type:`struct _frozen``, terminada por uno cuyos miembros son todos ``NULL`` " +"o cero. Cuando se importa un módulo congelado, se busca en esta tabla. El " +"código de terceros podría jugar con esto para proporcionar una colección " +"creada dinámicamente de módulos congelados." #: ../Doc/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`::" msgstr "" +"Así que manipular este puntero podría incluso resultar útil. Para restringir " +"el tamaño del ejemplo, sólo mostramos cómo esta tabla puede ser leída con :" +"mod:`ctypes`::" #: ../Doc/library/ctypes.rst:1095 msgid "" "We have defined the :c:type:`struct _frozen` data type, so we can get the " "pointer to the table::" msgstr "" +"Hemos definido el tipo de datos :c:type:`struct _frozen`, para que podamos " +"obtener el puntero de la tabla::" #: ../Doc/library/ctypes.rst:1102 msgid "" @@ -1053,6 +1390,11 @@ msgid "" "crash with an access violation or whatever, so it's better to break out of " "the loop when we hit the ``NULL`` entry::" msgstr "" +"Como \"tabla\" es un \"puntero\" al arreglo de registros “struct_frozen\", " +"podemos iterar sobre ella, pero sólo tenemos que asegurarnos de que nuestro " +"bucle termine, porque los punteros no tienen tamaño. Tarde o temprano, " +"probablemente se caerá con una violación de acceso o lo que sea, así que es " +"mejor salir del bucle cuando le demos a la entrada ``NULL``::" #: ../Doc/library/ctypes.rst:1120 msgid "" @@ -1060,26 +1402,35 @@ 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 "" +"El hecho de que la Python estándar tenga un módulo congelado y un paquete " +"congelado (indicado por el miembro ``tamaño`` negativo) no se conoce bien, " +"sólo se usa para hacer pruebas. Pruébalo con ``import __hello__`` por " +"ejemplo." #: ../Doc/library/ctypes.rst:1128 msgid "Surprises" -msgstr "" +msgstr "Sorpresas" #: ../Doc/library/ctypes.rst:1130 msgid "" "There are some edges in :mod:`ctypes` where you might expect something other " "than what actually happens." msgstr "" +"Hay algunas aristas en :mod:`ctypes` en las que podrías esperar algo " +"distinto de lo que realmente sucede." #: ../Doc/library/ctypes.rst:1133 msgid "Consider the following example::" -msgstr "" +msgstr "Considere el siguiente ejemplo::" #: ../Doc/library/ctypes.rst:1153 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 "" +"Hm. Ciertamente esperábamos que la última declaración imprimiera ``3 4 1 " +"2``. ¿Qué ha pasado? Aquí están los pasos de la línea ``rc.a, rc.b = rc.b, " +"rc.a`` arriba::" #: ../Doc/library/ctypes.rst:1161 msgid "" @@ -1089,6 +1440,11 @@ msgid "" "the contents of ``temp1``. So, the last assignment ``rc.b = temp1``, doesn't " "have the expected effect." msgstr "" +"Note que ``temp0`` y ``temp1`` son objetos que todavía usan el buffer " +"interno del objeto ``rc`` de arriba. Así que ejecutando ``rc.a = temp0`` " +"copia el contenido del buffer de ``temp0`` en el buffer de ``rc``. Esto, a " +"su vez, cambia el contenido de ``temp1``. Por lo tanto, la última asignación " +"``rc.b = temp1``, no tiene el efecto esperado." #: ../Doc/library/ctypes.rst:1167 msgid "" @@ -1096,18 +1452,25 @@ msgid "" "doesn't *copy* the sub-object, instead it retrieves a wrapper object " "accessing the root-object's underlying buffer." msgstr "" +"Tengan en cuenta que la recuperación de subobjetos de Estructuras, Uniones y " +"Arreglos no *copia* el subobjeto, sino que recupera un objeto contenido que " +"accede al búfer subyacente del objeto raíz." #: ../Doc/library/ctypes.rst:1171 msgid "" "Another example that may behave differently from what one would expect is " "this::" msgstr "" +"Otro ejemplo que puede comportarse de manera diferente a lo que uno " +"esperaría es este::" #: ../Doc/library/ctypes.rst:1183 msgid "" "Objects instantiated from :class:`c_char_p` can only have their value set to " "bytes or integers." msgstr "" +"Los objetos instanciados desde :class:`c_char_p` sólo pueden tener su valor " +"fijado en bytes o enteros." #: ../Doc/library/ctypes.rst:1186 msgid "" @@ -1117,15 +1480,23 @@ msgid "" "object itself, instead the ``contents`` of the object is stored. Accessing " "the contents again constructs a new Python object each time!" msgstr "" +"¿Por qué está imprimiendo ``False``? Las instancias ctypes son objetos que " +"contienen un bloque de memoria más algunos :term:`descriptor`\\s que acceden " +"al contenido de la memoria. Almacenar un objeto Python en el bloque de " +"memoria no almacena el objeto en sí mismo, en su lugar se almacenan los " +"``contenidos`` del objeto. ¡Acceder a los contenidos de nuevo construye un " +"nuevo objeto Python cada vez!" #: ../Doc/library/ctypes.rst:1196 msgid "Variable-sized data types" -msgstr "" +msgstr "Tipos de datos de tamaño variable" #: ../Doc/library/ctypes.rst:1198 msgid "" ":mod:`ctypes` provides some support for variable-sized arrays and structures." msgstr "" +":mod:``ctypes`` proporciona algo de soporte para matrices y estructuras de " +"tamaño variable." #: ../Doc/library/ctypes.rst:1200 msgid "" @@ -1135,6 +1506,12 @@ msgid "" "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 función :func:`resize` puede ser usada para redimensionar el buffer de " +"memoria de un objeto ctypes existente. La función toma el objeto como " +"primer argumento, y el tamaño solicitado en bytes como segundo argumento. " +"El bloque de memoria no puede hacerse más pequeño que el bloque de memoria " +"natural especificado por el tipo de objeto, se lanza un :exc:`ValueError` si " +"se intenta::" #: ../Doc/library/ctypes.rst:1220 msgid "" @@ -1142,6 +1519,9 @@ msgid "" "contained in this array? Since the type still only knows about 4 elements, " "we get errors accessing other elements::" msgstr "" +"Esto está bien, pero ¿cómo se puede acceder a los elementos adicionales " +"contenidos en este arreglo? Dado que el tipo todavía sabe sólo 4 elementos, " +"obtenemos errores al acceder a otros elementos::" #: ../Doc/library/ctypes.rst:1232 msgid "" @@ -1149,20 +1529,26 @@ msgid "" "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 "" +"Otra forma de utilizar tipos de datos de tamaño variable con :mod:`ctypes` " +"es utilizar la naturaleza dinámica de Python, y (re)definir el tipo de datos " +"después de que se conozca el tamaño requerido, caso por caso." #: ../Doc/library/ctypes.rst:1240 msgid "ctypes reference" -msgstr "" +msgstr "referencia ctypes" #: ../Doc/library/ctypes.rst:1246 msgid "Finding shared libraries" -msgstr "" +msgstr "Encontrar bibliotecas compartidas" #: ../Doc/library/ctypes.rst:1248 msgid "" "When programming in a compiled language, shared libraries are accessed when " "compiling/linking a program, and when the program is run." msgstr "" +"Cuando se programa en un lenguaje compilado, se accede a las bibliotecas " +"compartidas cuando se compila/enlaza un programa, y cuándo se ejecuta el " +"programa." #: ../Doc/library/ctypes.rst:1251 msgid "" @@ -1172,12 +1558,20 @@ msgid "" "while the ctypes library loaders act like when a program is run, and call " "the runtime loader directly." msgstr "" +"El propósito de la función :func:`find_library` es localizar una biblioteca " +"de forma similar a lo que hace el compilador o el cargador en tiempo de " +"ejecución (en plataformas con varias versiones de una biblioteca compartida " +"se debería cargar la más reciente), mientras que los cargadores de " +"bibliotecas ctypes actúan como cuando se ejecuta un programa, y llaman " +"directamente al cargador en tiempo de ejecución." #: ../Doc/library/ctypes.rst:1257 msgid "" "The :mod:`ctypes.util` module provides a function which can help to " "determine the library to load." msgstr "" +"El módulo :mod:`ctypes.util` proporciona una función que puede ayudar a " +"determinar la biblioteca a cargar." #: ../Doc/library/ctypes.rst:1265 msgid "" @@ -1186,10 +1580,15 @@ msgid "" "number (this is the form used for the posix linker option :option:`!-l`). " "If no library can be found, returns ``None``." msgstr "" +"Intenta encontrar una biblioteca y devolver un nombre. *name* es el nombre " +"de la biblioteca sin ningún prefijo como *lib*, sufijo como ``.so``, ``." +"dylib`` o número de versión (esta es la forma usada para la opción del " +"enlazador posix :option:`!-l`). Si no se puede encontrar ninguna " +"biblioteca, devuelve ``None``." #: ../Doc/library/ctypes.rst:1270 ../Doc/library/ctypes.rst:1903 msgid "The exact functionality is system dependent." -msgstr "" +msgstr "La funcionalidad exacta depende del sistema." #: ../Doc/library/ctypes.rst:1272 msgid "" @@ -1197,6 +1596,9 @@ msgid "" "ldconfig``, ``gcc``, ``objdump`` and ``ld``) to find the library file. It " "returns the filename of the library file." msgstr "" +"En Linux, :func:`find_library` intenta ejecutar programas externos (``/sbin/" +"ldconfig``, ``gcc``, ``objdump`` y ``ld``) para encontrar el archivo de la " +"biblioteca. Devuelve el nombre del archivo de la biblioteca." #: ../Doc/library/ctypes.rst:1276 msgid "" @@ -1204,16 +1606,22 @@ msgid "" "when searching for libraries, if a library cannot be found by any other " "means." msgstr "" +"En Linux, el valor de la variable de entorno ``LD_LIBRARY_PATH`` se utiliza " +"cuando se buscan bibliotecas, si una biblioteca no puede ser encontrada por " +"ningún otro medio." #: ../Doc/library/ctypes.rst:1280 msgid "Here are some examples::" -msgstr "" +msgstr "Aquí hay algunos ejemplos::" #: ../Doc/library/ctypes.rst:1291 msgid "" "On OS X, :func:`find_library` tries several predefined naming schemes and " "paths to locate the library, and returns a full pathname if successful::" msgstr "" +"En OS X, :func:`find_library` intenta varios esquemas de nombres y rutas " +"predefinidas para localizar la biblioteca, y devuelve una ruta completa si " +"tiene éxito::" #: ../Doc/library/ctypes.rst:1305 msgid "" @@ -1221,6 +1629,10 @@ msgid "" "returns the full pathname, but since there is no predefined naming scheme a " "call like ``find_library(\"c\")`` will fail and return ``None``." msgstr "" +"En Windows, :func:`find_library`` busca a lo largo de la ruta de búsqueda " +"del sistema, y devuelve la ruta completa, pero como no hay un esquema de " +"nombres predefinido, una llamada como ``find_library(\"c\")`` fallará y " +"devolverá ``None``." #: ../Doc/library/ctypes.rst:1309 msgid "" @@ -1229,16 +1641,22 @@ msgid "" "into the wrapper module instead of using :func:`find_library` to locate the " "library at runtime." msgstr "" +"Si envolvemos una biblioteca compartida con :mod:`ctypes`, puede ser mejor " +"determinar el nombre de la biblioteca compartida en tiempo de desarrollo, y " +"codificarlo en el módulo de envoltura en lugar de usar :func:`find_library` " +"para localizar la biblioteca en tiempo de ejecución." #: ../Doc/library/ctypes.rst:1317 msgid "Loading shared libraries" -msgstr "" +msgstr "Cargando bibliotecas compartidas" #: ../Doc/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:" msgstr "" +"Hay varias maneras de cargar las bibliotecas compartidas en el proceso " +"Python. Una forma es instanciar una de las siguientes clases:" #: ../Doc/library/ctypes.rst:1325 msgid "" @@ -1246,6 +1664,9 @@ msgid "" "these libraries use the standard C calling convention, and are assumed to " "return :c:type:`int`." msgstr "" +"Las instancias de esta clase representan bibliotecas compartidas cargadas. " +"Las funciones de estas bibliotecas usan la convención estándar de llamada C, " +"y se asume que devuelven :c:type:`int`." #: ../Doc/library/ctypes.rst:1332 msgid "" @@ -1256,10 +1677,17 @@ msgid "" "failed or succeeded, together with additional error code. If the return " "value signals a failure, an :class:`OSError` is automatically raised." msgstr "" +"Sólo Windows: Las instancias de esta clase representan bibliotecas " +"compartidas cargadas, las funciones en estas bibliotecas usan la convención " +"de llamada ``stdcall``, y se asume que devuelven el código específico de " +"windows :class:`HRESULT``. Los valores :class:`HRESULT`` contienen " +"información que especifica si la llamada a la función falló o tuvo éxito, " +"junto con un código de error adicional. Si el valor de retorno señala un " +"fracaso, se eleva automáticamente un :class:`OSError``." #: ../Doc/library/ctypes.rst:1339 msgid ":exc:`WindowsError` used to be raised." -msgstr "" +msgstr ":exc:`WindowsError` solía ser lanzado." #: ../Doc/library/ctypes.rst:1345 msgid "" @@ -1267,6 +1695,10 @@ msgid "" "functions in these libraries use the ``stdcall`` calling convention, and are " "assumed to return :c:type:`int` by default." msgstr "" +"Sólo Windows: Las instancias de esta clase representan bibliotecas " +"compartidas cargadas, las funciones de estas bibliotecas usan la convención " +"de llamada ``stdcall``, y se supone que devuelven :c:type:``int`` por " +"defecto." #: ../Doc/library/ctypes.rst:1349 msgid "" @@ -1274,12 +1706,17 @@ msgid "" "the :class:`WinDLL` and :class:`OleDLL` use the standard calling convention " "on this platform." msgstr "" +"En Windows CE sólo se utiliza la convención de llamadas estándar, para mayor " +"comodidad las :class:`WinDLL` y :class:`OleDLL` utilizan la convención de " +"llamadas estándar en esta plataforma." #: ../Doc/library/ctypes.rst:1353 msgid "" "The Python :term:`global interpreter lock` is released before calling any " "function exported by these libraries, and reacquired afterwards." msgstr "" +"El termino Python :term:`global interpreter lock` es lanzado antes de llamar " +"a cualquier función exportada por estas librerías, y se readquiere después." #: ../Doc/library/ctypes.rst:1359 msgid "" @@ -1288,10 +1725,17 @@ msgid "" "function execution the Python error flag is checked. If the error flag is " "set, a Python exception is raised." msgstr "" +"Las instancias de esta clase se comportan como instancias :class:`CDLL` , " +"excepto que el GIL de Python es *no* liberado durante la llamada a la " +"función, y después de la ejecución de la función se comprueba si esta activo " +"el flag de error de Python. Si el flag de error esta activado, se lanza una " +"excepción Python." #: ../Doc/library/ctypes.rst:1364 msgid "Thus, this is only useful to call Python C api functions directly." msgstr "" +"Por lo tanto, esto sólo es útil para llamar directamente a las funciones api " +"C de Pythoni." #: ../Doc/library/ctypes.rst:1366 msgid "" @@ -1302,6 +1746,12 @@ msgid "" "``LoadLibrary`` function is used to load the library into the process, and " "to get a handle to it." msgstr "" +"Todas estas clases pueden ser instanciadas llamándolas con al menos un " +"argumento, la ruta de la biblioteca compartida. Si tienes un manejador " +"existente de una biblioteca compartida ya cargada, se puede pasar como el " +"parámetro llamado ``handle``, de lo contrario la función ``dlopen`` o " +"``LoadLibrary`` de la plataforma subyacente es utilizada para cargar la " +"biblioteca en el proceso, y obtener un manejador de la misma." #: ../Doc/library/ctypes.rst:1373 msgid "" @@ -1310,6 +1760,10 @@ msgid "" "ignored. On posix systems, RTLD_NOW is always added, and is not " "configurable." msgstr "" +"El parámetro *mode* puede utilizarse para especificar cómo se carga la " +"biblioteca. Para más detalles, consulte la página :manpage:`dlopen(3)` " +"manpage. En Windows, *mode* es ignorado. En los sistemas posix, RTLD_NOW " +"siempre se agrega, y no es configurable." #: ../Doc/library/ctypes.rst:1378 msgid "" @@ -1320,6 +1774,13 @@ msgid "" "the :data:`errno` value before the function call is swapped with the ctypes " "private copy, the same happens immediately after the function call." msgstr "" +"El parámetro *use_errno*, cuando se establece en true, habilita un mecanismo " +"ctypes que permite acceder al número de error del sistema :data:`errno` de " +"forma segura. :mod:`ctypes` mantiene una copia local del hilo de la variable " +"del sistema :data:`errno`; si llamas a funciones extranjeras creadas con " +"``use_errno=True`` entonces el valor :data:`errno` antes de la llamada a la " +"función se intercambia con la copia privada de ctypes, lo mismo ocurre " +"inmediatamente después de la llamada a la función." #: ../Doc/library/ctypes.rst:1385 msgid "" @@ -1327,6 +1788,9 @@ msgid "" "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 función :func:`ctypes.get_errno` devuelve el valor de la copia privada de " +"ctypes, y la función :func:`ctypes.set_errno` cambia la copia privada de " +"ctypes a un nuevo valor y devuelve el valor anterior." #: ../Doc/library/ctypes.rst:1389 msgid "" @@ -1336,6 +1800,12 @@ msgid "" "and :func:`ctypes.set_last_error` are used to request and change the ctypes " "private copy of the windows error code." msgstr "" +"El parámetro *use_last_error*, cuando se establece en true, habilita el " +"mismo mecanismo para el código de error de Windows que es administrado por " +"las funciones de la API de Windows :func:`GetLastError` y :func:" +"`SetLastError`; :func:`ctypes.get_last_error` y :func:`ctypes." +"set_last_error` se utilizan para solicitar y cambiar la copia privada ctypes " +"del código de error de Windows." #: ../Doc/library/ctypes.rst:1395 msgid "" @@ -1346,28 +1816,42 @@ msgid "" "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 "" +"El parámetro *winmode* se utiliza en Windows para especificar cómo se carga " +"la biblioteca (ya que *mode* se ignora). Toma cualquier valor que sea válido " +"para el parámetro flags de la API de Win32 ``LoadLibraryEx``. Cuando se " +"omite, el valor por defecto es usar los flags que resultan en la carga de " +"DLL más segura para evitar problemas como el secuestro de DLL. Pasar la ruta " +"completa a la DLL es la forma más segura de asegurar que se cargan la " +"biblioteca y las dependencias correctas." #: ../Doc/library/ctypes.rst:1402 msgid "Added *winmode* parameter." -msgstr "" +msgstr "Añadido el parámetro *winmode*." #: ../Doc/library/ctypes.rst:1409 msgid "" "Flag to use as *mode* parameter. On platforms where this flag is not " "available, it is defined as the integer zero." msgstr "" +"Flag para usar como parámetro *modo*. En las plataformas en las que esta " +"bandera no está disponible, se define como el cero entero." #: ../Doc/library/ctypes.rst:1416 msgid "" "Flag to use as *mode* parameter. On platforms where this is not available, " "it is the same as *RTLD_GLOBAL*." msgstr "" +"Flag para usar como parámetro *modo*. En las plataformas en las que esto no " +"está disponible, es lo mismo que *RTLD_GLOBAL*." #: ../Doc/library/ctypes.rst:1423 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 "" +"El modo por defecto que se utiliza para cargar las bibliotecas compartidas. " +"En OSX 10.3, esto es *RTLD_GLOBAL*, de lo contrario es lo mismo que " +"*RTLD_LOCAL*." #: ../Doc/library/ctypes.rst:1426 msgid "" @@ -1377,20 +1861,28 @@ msgid "" "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 "" +"Las instancias de estas clases no tienen métodos públicos. Se puede acceder " +"a las funciones exportadas por la biblioteca compartida como atributos o por " +"índice. Tenga en cuenta que al acceder a la función a través de un atributo " +"se almacena en caché el resultado y, por lo tanto, al acceder a él " +"repetidamente se devuelve el mismo objeto cada vez. Por otro lado, acceder " +"a ella a través de un índice devuelve un nuevo objeto cada vez::" #: ../Doc/library/ctypes.rst:1439 msgid "" "The following public attributes are available, their name starts with an " "underscore to not clash with exported function names:" msgstr "" +"Los siguientes atributos públicos están disponibles, su nombre comienza con " +"un guión bajo para no chocar con los nombres de las funciones exportadas:" #: ../Doc/library/ctypes.rst:1445 msgid "The system handle used to access the library." -msgstr "" +msgstr "El manejador del sistema usado para acceder a la biblioteca." #: ../Doc/library/ctypes.rst:1450 msgid "The name of the library passed in the constructor." -msgstr "" +msgstr "El nombre de la biblioteca pasado en el constructor." #: ../Doc/library/ctypes.rst:1452 msgid "" @@ -1399,12 +1891,18 @@ msgid "" "calling the :meth:`LoadLibrary` method, or by retrieving the library as " "attribute of the loader instance." msgstr "" +"Las bibliotecas compartidas también pueden ser cargadas usando uno de los " +"objetos prefabricados, que son instancias de la clase :class:" +"`LibraryLoader`, ya sea llamando al método :meth:`LoadLibrary`, o " +"recuperando la biblioteca como atributo de la instancia de carga." #: ../Doc/library/ctypes.rst:1460 msgid "" "Class which loads shared libraries. *dlltype* should be one of the :class:" "`CDLL`, :class:`PyDLL`, :class:`WinDLL`, or :class:`OleDLL` types." msgstr "" +"Clase que carga bibliotecas compartidas. *dlltype* debe ser uno de los " +"tipos :class:`CDLL`, :class:`PyDLL`, :class:`WinDLL`, o :class:`OleDLL`." #: ../Doc/library/ctypes.rst:1463 msgid "" @@ -1412,38 +1910,46 @@ msgid "" "by accessing it as attribute of a library loader instance. The result is " "cached, so repeated attribute accesses return the same library each time." msgstr "" +":meth:``getattr__`` tiene un comportamiento especial: Permite cargar una " +"biblioteca compartida accediendo a ella como atributo de una instancia de " +"carga de biblioteca. El resultado se almacena en caché, de modo que los " +"accesos repetidos a los atributos devuelven la misma biblioteca cada vez." #: ../Doc/library/ctypes.rst:1469 msgid "" "Load a shared library into the process and return it. This method always " "returns a new instance of the library." msgstr "" +"Carga una biblioteca compartida en el proceso y la devuelve. Este método " +"siempre devuelve una nueva instancia de la biblioteca." #: ../Doc/library/ctypes.rst:1473 msgid "These prefabricated library loaders are available:" -msgstr "" +msgstr "Estos cargadores prefabricados de bibliotecas están disponibles:" #: ../Doc/library/ctypes.rst:1478 msgid "Creates :class:`CDLL` instances." -msgstr "" +msgstr "Crea instancias de :class:`CDLL`." #: ../Doc/library/ctypes.rst:1484 msgid "Windows only: Creates :class:`WinDLL` instances." -msgstr "" +msgstr "Sólo Windows: Crea instancias de :class:`WinDLL`." #: ../Doc/library/ctypes.rst:1490 msgid "Windows only: Creates :class:`OleDLL` instances." -msgstr "" +msgstr "Sólo Windows: Crea instancias de :class:`OleDLL`." #: ../Doc/library/ctypes.rst:1496 msgid "Creates :class:`PyDLL` instances." -msgstr "" +msgstr "Crea instancias de :class:`PyDLL`." #: ../Doc/library/ctypes.rst:1499 msgid "" "For accessing the C Python api directly, a ready-to-use Python shared " "library object is available:" msgstr "" +"Para acceder directamente a la API C de Python, se dispone de un objeto de " +"biblioteca compartida de Python listo-para-usar:" #: ../Doc/library/ctypes.rst:1505 msgid "" @@ -1452,11 +1958,18 @@ msgid "" "`int`, which is of course not always the truth, so you have to assign the " "correct :attr:`restype` attribute to use these functions." msgstr "" +"Una instancia de :class:`PyDLL` que expone las funciones de la API C de " +"Python como atributos. Ten en cuenta que se supone que todas estas " +"funciones devuelven C :c:type:`int`, lo que por supuesto no siempre es " +"cierto, así que tienes que asignar el atributo correcto :attr:`restype` para " +"usar estas funciones." msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlopen`` with argument " "``name``." msgstr "" +"Lanza un :ref:``auditing event ` ``ctypes.dlopen`` con el " +"argumento ``name``." #: ../Doc/library/ctypes.rst:1512 msgid "" @@ -1464,11 +1977,16 @@ msgid "" "event ` ``ctypes.dlopen`` with string argument ``name``, the name " "used to load the library." msgstr "" +"Cargar una biblioteca a través de cualquiera de estos objetos lanza un :ref:" +"`auditing event ` ``ctypes.dlopen`` con el argumento de cadena " +"``name``, el nombre usado para cargar la biblioteca." msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym`` with arguments " "``library``, ``name``." msgstr "" +"Lanza un :ref:``auditing event ` ``ctypes.dlsym`` con argumentos " +"``library``, ``name``." #: ../Doc/library/ctypes.rst:1518 msgid "" @@ -1476,11 +1994,16 @@ msgid "" "dlsym`` with arguments ``library`` (the library object) and ``name`` (the " "symbol's name as a string or integer)." msgstr "" +"Al acceder a una función en una biblioteca cargada se lanza un evento de " +"auditoría ``ctypes.dlsym`` con argumentos ``library`` (el objeto de la " +"biblioteca) y ``name`` (el nombre del símbolo como cadena o entero)." msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym/handle`` with " "arguments ``handle``, ``name``." msgstr "" +"Lanza un :ref:``auditing event ` ``ctypes.dlsym/handle`` con " +"argumentos ``handle``, ``name``." #: ../Doc/library/ctypes.rst:1524 msgid "" @@ -1488,10 +2011,14 @@ msgid "" "accessing a function raises an auditing event ``ctypes.dlsym/handle`` with " "arguments ``handle`` (the raw library handle) and ``name``." msgstr "" +"En los casos en los que sólo está disponible el manejador de la biblioteca " +"en lugar del objeto, al acceder a una función se produce un evento de " +"auditoría ``ctypes.dlsym/handle`` con los argumentos ``handle`` (el " +"manejador de la biblioteca en bruto) y ``name``." #: ../Doc/library/ctypes.rst:1531 msgid "Foreign functions" -msgstr "" +msgstr "Funciones foráneas" #: ../Doc/library/ctypes.rst:1533 msgid "" @@ -1501,28 +2028,40 @@ msgid "" "instances as arguments, and return the default result type specified by the " "library loader. They are instances of a private class:" msgstr "" +"Como se explicó en la sección anterior, se puede acceder a las funciones " +"foráneas como atributos de las bibliotecas compartidas cargadas. Los " +"objetos de función creados de esta forma aceptan por defecto cualquier " +"número de argumentos, aceptan cualquier instancia de datos ctypes como " +"argumentos y devuelven el tipo de resultado por defecto especificado por el " +"cargador de la biblioteca. Son instancias de una clase privada:" #: ../Doc/library/ctypes.rst:1542 msgid "Base class for C callable foreign functions." -msgstr "" +msgstr "Clase base para funciones foráneas C llamables." #: ../Doc/library/ctypes.rst:1544 msgid "" "Instances of foreign functions are also C compatible data types; they " "represent C function pointers." msgstr "" +"Las instancias de funciones foráneas también son tipos de datos compatibles " +"con C; representan punteros de funciones C." #: ../Doc/library/ctypes.rst:1547 msgid "" "This behavior can be customized by assigning to special attributes of the " "foreign function object." msgstr "" +"Este comportamiento puede personalizarse asignando a los atributos " +"especiales del objeto de la función foránea." #: ../Doc/library/ctypes.rst:1552 msgid "" "Assign a ctypes type to specify the result type of the foreign function. Use " "``None`` for :c:type:`void`, a function not returning anything." msgstr "" +"Asigne un tipo de ctypes para especificar el tipo de resultado de la función " +"externa. Usa ``None`` para :c:type:`void`, una función que no devuelve nada." #: ../Doc/library/ctypes.rst:1555 msgid "" @@ -1533,6 +2072,13 @@ msgid "" "or error checking use a ctypes data type as :attr:`restype` and assign a " "callable to the :attr:`errcheck` attribute." msgstr "" +"Es posible asignar un objeto Python llamable que no sea de tipo ctypes, en " +"este caso se supone que la función devuelve un C :c:type:`int`, y el " +"llamable se llamará con este entero, lo que permite un posterior " +"procesamiento o comprobación de errores. El uso de esto está obsoleto, para " +"un postprocesamiento más flexible o para la comprobación de errores utilice " +"un tipo de datos ctypes como :attr:`restype` y asigne un llamable al " +"atributo :attr:`errcheck`." #: ../Doc/library/ctypes.rst:1564 msgid "" @@ -1542,6 +2088,11 @@ msgid "" "tuple; functions using the C calling convention accept additional, " "unspecified arguments as well." msgstr "" +"Asigne una tupla de tipos ctypes para especificar los tipos de argumentos " +"que acepta la función. Las funciones que utilizan la convención de llamada " +"\"stdcall\" sólo pueden ser llamadas con el mismo número de argumentos que " +"la longitud de esta tupla; las funciones que utilizan la convención de " +"llamada C aceptan también argumentos adicionales no especificados." #: ../Doc/library/ctypes.rst:1570 msgid "" @@ -1552,6 +2103,12 @@ msgid "" "attr:`argtypes` tuple will convert a string passed as argument into a bytes " "object using ctypes conversion rules." msgstr "" +"Cuando se llama a una función foránea, cada argumento real se pasa al método " +"de la clase :meth:`from_param` de los elementos de la tupla :attr:" +"`argtypes`, este método permite adaptar el argumento real a un objeto que la " +"función externa acepta. Por ejemplo, un elemento :class:`c_char_p` de la " +"tupla :attr:`argtypes` convertirá una cadena pasada como argumento en un " +"objeto de bytes utilizando reglas de conversión ctypes." #: ../Doc/library/ctypes.rst:1577 msgid "" @@ -1560,30 +2117,45 @@ msgid "" "usable as argument (integer, string, ctypes instance). This allows defining " "adapters that can adapt custom objects as function parameters." msgstr "" +"Nuevo: Ahora es posible poner en argtypes elementos que no son de tipo " +"ctypes, pero cada elemento debe tener un método :meth:`from_param` que " +"devuelva un valor utilizable como argumento (entero, cadena, instancia " +"ctypes). Esto permite definir adaptadores que pueden adaptar objetos " +"personalizados como parámetros de la función." #: ../Doc/library/ctypes.rst:1584 msgid "" "Assign a Python function or another callable to this attribute. The callable " "will be called with three or more arguments:" msgstr "" +"Asigne una función Python u otra llamada a este atributo. El llamable será " +"llamado con tres o más argumentos:" #: ../Doc/library/ctypes.rst:1591 msgid "" "*result* is what the foreign function returns, as specified by the :attr:" "`restype` attribute." msgstr "" +"*result* es lo que devuelve la función externa, como se especifica en el " +"atributo :attr:`restype`." #: ../Doc/library/ctypes.rst:1594 msgid "" "*func* is the foreign function object itself, this allows reusing the same " "callable object to check or post process the results of several functions." msgstr "" +"*func* es el propio objeto de la función foránea, lo que permite reutilizar " +"el mismo objeto llamable para comprobar o postprocesar los resultados de " +"varias funciones." #: ../Doc/library/ctypes.rst:1598 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* es una tupla que contiene los parámetros originalmente pasados a " +"la llamada de la función, esto permite especializar el comportamiento en los " +"argumentos utilizados." #: ../Doc/library/ctypes.rst:1602 msgid "" @@ -1591,17 +2163,24 @@ msgid "" "function call, but it can also check the result value and raise an exception " "if the foreign function call failed." msgstr "" +"El objeto que devuelve esta función será devuelto por la llamada de la " +"función foránea, pero también puede comprobar el valor del resultado y hacer " +"una excepción si la llamada de la función foránea ha fallado." #: ../Doc/library/ctypes.rst:1609 msgid "" "This exception is raised when a foreign function call cannot convert one of " "the passed arguments." msgstr "" +"Esta excepción se lanza cuando una llamada a una función forána no puede " +"convertir uno de los argumentos pasados." msgid "" "Raises an :ref:`auditing event ` ``ctypes.seh_exception`` with " "argument ``code``." msgstr "" +"Lanza un :ref:``auditing event ` ``ctypes.seh_exception`` con el " +"argumento ``code``." #: ../Doc/library/ctypes.rst:1615 msgid "" @@ -1611,11 +2190,19 @@ msgid "" "seh_exception`` with argument ``code`` will be raised, allowing an audit " "hook to replace the exception with its own." msgstr "" +"En Windows, cuando una llamada a una función foránea plantea una excepción " +"de sistema (por ejemplo, debido a una violación de acceso), será capturada y " +"sustituida por una excepción Python adecuada. Además, un evento de auditoría " +"``ctypes.seh_exception`` con el argumento ``code`` será levantado, " +"permitiendo que un gancho de auditoría reemplace la excepción con la suya " +"propia." msgid "" "Raises an :ref:`auditing event ` ``ctypes.call_function`` with " "arguments ``func_pointer``, ``arguments``." msgstr "" +"Lanza un :ref:`auditing event ` ``ctypes.call_function`` con " +"argumentos ``func_pointer``, ``arguments``." #: ../Doc/library/ctypes.rst:1623 msgid "" @@ -1623,10 +2210,13 @@ msgid "" "``ctypes.call_function`` with arguments ``function pointer`` and " "``arguments``." msgstr "" +"Algunas formas de invocar llamadas a funciones foráneas pueden lanzar un " +"evento de auditoría ``ctypes.call_function`` con los argumentos ``function " +"pointer`` y ``arguments``." #: ../Doc/library/ctypes.rst:1629 msgid "Function prototypes" -msgstr "" +msgstr "Prototipos de funciones" #: ../Doc/library/ctypes.rst:1631 msgid "" @@ -1638,6 +2228,14 @@ msgid "" "decorator factories, and as such, be applied to functions through the " "``@wrapper`` syntax. See :ref:`ctypes-callback-functions` for examples." msgstr "" +"Las funciones foráneas también pueden crearse mediante la instanciación de " +"prototipos de funciones. Los prototipos de funciones son similares a los " +"prototipos de funciones en C; describen una función (tipo de retorno, tipos " +"de argumentos, convención de llamada) sin definir una implementación. Las " +"funciones de fábrica deben ser llamadas con el tipo de resultado deseado y " +"los tipos de argumento de la función, y pueden ser usadas como fábricas de " +"decoradores, y como tales, ser aplicadas a las funciones a través de la " +"sintaxis ``@wrapper``. Ver :ref:`ctypes-callback-functions`` para ejemplos." #: ../Doc/library/ctypes.rst:1642 msgid "" @@ -1647,6 +2245,12 @@ 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 "" +"El prototipo de función devuelto crea funciones que usan la convención de " +"llamada C estándar. La función liberará el GIL durante la llamada. Si " +"*use_errno* se configura a true, la copia privada de ctypes de la variable " +"del sistema :data:`errno` se intercambia con el valor real :data:`errno` " +"antes y después de la llamada; *use_last_error* hace lo mismo con el código " +"de error de Windows." #: ../Doc/library/ctypes.rst:1652 msgid "" @@ -1656,12 +2260,19 @@ msgid "" "the GIL during the call. *use_errno* and *use_last_error* have the same " "meaning as above." msgstr "" +"Sólo Windows: El prototipo de función devuelto crea funciones que usan la " +"convención de llamada \"STDCALL\", excepto en Windows CE donde :func:" +"`WINFUNCTYPE` es lo mismo que :func:`CFUNCTYPE`. La función lanzará el GIL " +"durante la llamada. *use_errno* y *use_last_error* tienen el mismo " +"significado que arriba." #: ../Doc/library/ctypes.rst:1661 msgid "" "The returned function prototype creates functions that use the Python " "calling convention. The function will *not* release the GIL during the call." msgstr "" +"El prototipo de función devuelto crea funciones que usan la convención de " +"llamadas de Python. La función *no* liberará el GIL durante la llamada." #: ../Doc/library/ctypes.rst:1664 msgid "" @@ -1669,16 +2280,23 @@ msgid "" "in different ways, depending on the type and number of the parameters in the " "call:" msgstr "" +"Los prototipos de funciones creados por estas funciones de fábrica pueden " +"ser instanciados de diferentes maneras, dependiendo del tipo y el número de " +"los parámetros en la llamada:" #: ../Doc/library/ctypes.rst:1672 msgid "" "Returns a foreign function at the specified address which must be an integer." msgstr "" +"Devuelve una función foránea en la dirección especificada que debe ser un " +"número entero." #: ../Doc/library/ctypes.rst:1679 msgid "" "Create a C callable function (a callback function) from a Python *callable*." msgstr "" +"Crear una función de llamada C (una función de devolución de llamada) a " +"partir de un *llamable* Python." #: ../Doc/library/ctypes.rst:1686 msgid "" @@ -1687,6 +2305,11 @@ msgid "" "exported function as string, or the ordinal of the exported function as " "small integer. The second item is the shared library instance." msgstr "" +"Devuelve una función foránea exportada por una biblioteca compartida. " +"*func_spec* debe ser un 2-tupla ``(name_or_ordinal, library)``. El primer " +"elemento es el nombre de la función exportada como cadena, o el ordinal de " +"la función exportada como entero pequeño. El segundo elemento es la " +"instancia de la biblioteca compartida." #: ../Doc/library/ctypes.rst:1696 msgid "" @@ -1695,6 +2318,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 "" +"Devuelve una función foránea que llamará a un método COM. *vtbl_index* es el " +"índice de la tabla de funciones virtuales, un pequeño entero no negativo. " +"*name* es el nombre del método COM. *iid* es un puntero opcional para el " +"identificador de la interfaz que se utiliza en el informe de errores " +"extendido." #: ../Doc/library/ctypes.rst:1701 msgid "" @@ -1702,62 +2330,75 @@ msgid "" "COM interface as first argument, in addition to those parameters that are " "specified in the :attr:`argtypes` tuple." msgstr "" +"Los métodos COM usan una convención especial de llamadas: Requieren un " +"puntero a la interfaz COM como primer argumento, además de los parámetros " +"que se especifican en la tupla :attr:`argtypes`." #: ../Doc/library/ctypes.rst:1705 msgid "" "The optional *paramflags* parameter creates foreign function wrappers with " "much more functionality than the features described above." msgstr "" +"El parámetro opcional *paramflags* crea envoltorios de funciones foráneas " +"con mucha más funcionalidad que las características descritas anteriormente." #: ../Doc/library/ctypes.rst:1708 msgid "*paramflags* must be a tuple of the same length as :attr:`argtypes`." msgstr "" +"*paramflags* deben ser una tupla de la misma longitud que :attr:`argtypes`." #: ../Doc/library/ctypes.rst:1710 msgid "" "Each item in this tuple contains further information about a parameter, it " "must be a tuple containing one, two, or three items." msgstr "" +"Cada elemento de esta tupla contiene más información sobre un parámetro, " +"debe ser una tupla que contenga uno, dos o tres elementos." #: ../Doc/library/ctypes.rst:1713 msgid "" "The first item is an integer containing a combination of direction flags for " "the parameter:" msgstr "" +"El primer elemento es un entero que contiene una combinación de flags de " +"dirección para el parámetro:" #: ../Doc/library/ctypes.rst:1717 msgid "1" -msgstr "" +msgstr "1" #: ../Doc/library/ctypes.rst:1717 msgid "Specifies an input parameter to the function." -msgstr "" +msgstr "Especifica un parámetro de entrada a la función." #: ../Doc/library/ctypes.rst:1720 msgid "2" -msgstr "" +msgstr "2" #: ../Doc/library/ctypes.rst:1720 msgid "Output parameter. The foreign function fills in a value." -msgstr "" +msgstr "Parámetro de salida. La función foránea rellena un valor." #: ../Doc/library/ctypes.rst:1723 msgid "4" -msgstr "" +msgstr "4" #: ../Doc/library/ctypes.rst:1723 msgid "Input parameter which defaults to the integer zero." -msgstr "" +msgstr "Parámetro de entrada que por defecto es el cero entero." #: ../Doc/library/ctypes.rst:1725 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 "" +"El segundo elemento opcional es el nombre del parámetro como cadena. Si se " +"especifica esto, se puede llamar a la función foránea con parámetros con " +"nombre." #: ../Doc/library/ctypes.rst:1728 msgid "The optional third item is the default value for this parameter." -msgstr "" +msgstr "El tercer elemento opcional es el valor por defecto de este parámetro." #: ../Doc/library/ctypes.rst:1730 msgid "" @@ -1765,14 +2406,17 @@ msgid "" "so that it supports default parameters and named arguments. The C " "declaration from the windows header file is this::" msgstr "" +"Este ejemplo demuestra cómo envolver la función ``MessageBoxW`` de Windows " +"para que soporte los parámetros por defecto y los argumentos con nombre. La " +"declaración C del archivo de cabecera de Windows es esta::" #: ../Doc/library/ctypes.rst:1741 ../Doc/library/ctypes.rst:1764 msgid "Here is the wrapping with :mod:`ctypes`::" -msgstr "" +msgstr "Aquí está el envoltorio con :mod:`ctypes`::" #: ../Doc/library/ctypes.rst:1749 msgid "The ``MessageBox`` foreign function can now be called in these ways::" -msgstr "" +msgstr "La función foránea de ``MessageBox`` puede ser llamada de esta manera:" #: ../Doc/library/ctypes.rst:1755 msgid "" @@ -1781,6 +2425,10 @@ msgid "" "copying them into ``RECT`` structure that the caller has to supply. Here is " "the C declaration::" msgstr "" +"Un segundo ejemplo demuestra los parámetros de salida. La función " +"``GetWindowRect`` de win32 retorna las dimensiones de una ventana " +"especificada copiándolas en la estructura ``RECT`` que la persona que llama " +"tiene que suministrar. Aquí está la declaración C::" #: ../Doc/library/ctypes.rst:1773 msgid "" @@ -1789,6 +2437,10 @@ msgid "" "parameter values when there are more than one, so the GetWindowRect function " "now returns a RECT instance, when called." msgstr "" +"Las funciones con parámetros de salida devolverán automáticamente el valor " +"del parámetro de salida si hay uno solo, o una tupla que contiene los " +"valores del parámetro de salida cuando hay más de uno, por lo que la función " +"GetWindowRect devuelve ahora una instancia RECT, cuando se llama." #: ../Doc/library/ctypes.rst:1778 msgid "" @@ -1798,6 +2450,12 @@ msgid "" "function could do the error checking, and raises an exception when the api " "call failed::" msgstr "" +"Los parámetros de salida pueden combinarse con el protocolo :attr:`errcheck` " +"para hacer un mayor procesamiento de la salida y la comprobación de " +"errores. La función api de win32 ``GetWindowRect`` devuelve un ``BOOL`` " +"para señalar el éxito o el fracaso, por lo que esta función podría hacer la " +"comprobación de errores, y plantea una excepción cuando la llamada api ha " +"fallado::" #: ../Doc/library/ctypes.rst:1791 msgid "" @@ -1807,28 +2465,40 @@ 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 función :attr:`errcheck` devuelve la tupla de argumentos que recibe " +"sin cambios, :mod:`ctypes` continúa el procesamiento normal que hace en los " +"parámetros de salida. Si quieres devolver una tupla de coordenadas de " +"ventana en lugar de una instancia ``RECT``, puedes recuperar los campos de " +"la función y devolverlos en su lugar, el procesamiento normal ya no tendrá " +"lugar::" #: ../Doc/library/ctypes.rst:1810 msgid "Utility functions" -msgstr "" +msgstr "Funciones de utilidad" #: ../Doc/library/ctypes.rst:1814 msgid "" "Returns the address of the memory buffer as integer. *obj* must be an " "instance of a ctypes type." msgstr "" +"Devuelve la dirección del buffer de memoria como un entero. *obj* debe ser " +"una instancia de tipo ctypes." #: ../Doc/library/ctypes.rst:1817 msgid "" "Raises an :ref:`auditing event ` ``ctypes.addressof`` with " "argument ``obj``." msgstr "" +"Levanta un :ref:``auditing event ` ``ctypes.addressof`` con el " +"argumento ``obj``." #: ../Doc/library/ctypes.rst:1822 msgid "" "Returns the alignment requirements of a ctypes type. *obj_or_type* must be a " "ctypes type or instance." msgstr "" +"Devuelve los requerimientos de alineación de un tipo de ctypes. " +"*obj_or_type* debe ser un tipo o instancia ctypes." #: ../Doc/library/ctypes.rst:1828 msgid "" @@ -1836,16 +2506,22 @@ msgid "" "ctypes type. *offset* defaults to zero, and must be an integer that will be " "added to the internal pointer value." msgstr "" +"Devuelve un puntero ligero a *obj*, que debe ser un ejemplo de un tipo de " +"ctypes. *offset* es por defecto cero, y debe ser un entero que se añadirá " +"al valor del puntero interno." #: ../Doc/library/ctypes.rst:1832 msgid "``byref(obj, offset)`` corresponds to this C code::" -msgstr "" +msgstr "\"byref (obj, offset)\" corresponde a este código C::" #: ../Doc/library/ctypes.rst:1836 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." msgstr "" +"El objeto devuelto sólo puede ser utilizado como un parámetro de llamada de " +"función foránea. Se comporta de manera similar a ``pointer(obj)``, pero la " +"construcción es mucho más rápida." #: ../Doc/library/ctypes.rst:1842 msgid "" @@ -1854,18 +2530,27 @@ msgid "" "must be a pointer type, and *obj* must be an object that can be interpreted " "as a pointer." msgstr "" +"Esta función es similar a la del operador de reparto en C. Devuelve una " +"nueva instancia de *type* que apunta al mismo bloque de memoria que *obj*. " +"*type* debe ser un tipo de puntero, y *obj* debe ser un objeto que pueda ser " +"interpretado como un puntero." #: ../Doc/library/ctypes.rst:1850 msgid "" "This function creates a mutable character buffer. The returned object is a " "ctypes array of :class:`c_char`." msgstr "" +"Esta función crea un búfer de caracteres mutables. El objeto devuelto es un " +"arreglo de ctypes de :class:`c_char`." #: ../Doc/library/ctypes.rst:1853 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." msgstr "" +"*init_or_size* debe ser un número entero que especifique el tamaño del " +"arreglo, o un objeto de bytes que se utilizará para inicializar los " +"elementos del arreglo." #: ../Doc/library/ctypes.rst:1856 msgid "" @@ -1875,24 +2560,35 @@ msgid "" "allows specifying the size of the array if the length of the bytes should " "not be used." msgstr "" +"Si se especifica un objeto bytes como primer argumento, el buffer se hace un " +"elemento más grande que su longitud, de modo que el último elemento de la " +"matriz es un carácter de terminación NUL. Se puede pasar un entero como " +"segundo argumento que permite especificar el tamaño del arreglo si no se " +"debe utilizar la longitud de los bytes." #: ../Doc/library/ctypes.rst:1861 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_string_buffer`` " "with arguments ``init``, ``size``." msgstr "" +"Lanza un :ref:`auditing event ` ``ctypes.create_string_buffer`` " +"con argumentos ``init``, ``size``." #: ../Doc/library/ctypes.rst:1866 msgid "" "This function creates a mutable unicode character buffer. The returned " "object is a ctypes array of :class:`c_wchar`." msgstr "" +"Esta función crea un búfer de caracteres unicode mutable. El objeto devuelto " +"es un arreglo de ctypes de :class:`c_wchar`." #: ../Doc/library/ctypes.rst:1869 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." msgstr "" +"*init_or_size* debe ser un entero que especifique el tamaño del arreglo, o " +"una cadena que se utilizará para inicializar los elementos del arreglo." #: ../Doc/library/ctypes.rst:1872 msgid "" @@ -1902,12 +2598,19 @@ msgid "" "which allows specifying the size of the array if the length of the string " "should not be used." msgstr "" +"Si se especifica una cadena como primer argumento, el búfer se hace un " +"elemento más grande que la longitud de la cadena, de modo que el último " +"elemento del arreglo es un carácter de terminación NUL. Se puede pasar un " +"entero como segundo argumento que permite especificar el tamaño del arreglo " +"si no se debe utilizar la longitud de la cadena." #: ../Doc/library/ctypes.rst:1878 msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_unicode_buffer`` " "with arguments ``init``, ``size``." msgstr "" +"Lanza un :ref:`auditing event ` ``ctypes.create_unicode_buffer`` " +"con argumentos ``init``, ``size``." #: ../Doc/library/ctypes.rst:1883 msgid "" @@ -1915,6 +2618,9 @@ msgid "" "COM servers with ctypes. It is called from the DllCanUnloadNow function " "that the _ctypes extension dll exports." msgstr "" +"Sólo Windows: Esta función es un gancho que permite implementar servidores " +"COM en proceso con ctypes. Se llama desde la función DllCanUnloadNow que la " +"extensión _ctypes dll exporta." #: ../Doc/library/ctypes.rst:1890 msgid "" @@ -1922,6 +2628,9 @@ msgid "" "COM servers with ctypes. It is called from the DllGetClassObject function " "that the ``_ctypes`` extension dll exports." msgstr "" +"Sólo Windows: Esta función es un gancho que permite implementar servidores " +"COM en proceso con ctypes. Se llama desde la función DllGetClassObject que " +"la extensión ``_ctypes`` exporta." #: ../Doc/library/ctypes.rst:1898 msgid "" @@ -1930,6 +2639,11 @@ msgid "" "number (this is the form used for the posix linker option :option:`!-l`). " "If no library can be found, returns ``None``." msgstr "" +"Intenta encontrar una biblioteca y devolver un nombre. *name* es el nombre " +"de la biblioteca sin ningún prefijo como ``lib``, sufijo como ``.so``, ``." +"dylib`` o número de versión (esta es la forma usada para la opción del " +"enlazador posix :option:`!-l`). Si no se puede encontrar ninguna " +"biblioteca, devuelve ``None``." #: ../Doc/library/ctypes.rst:1909 msgid "" @@ -1937,6 +2651,9 @@ msgid "" "and by the extension modules. If the name of the library cannot be " "determined, ``None`` is returned." msgstr "" +"Sólo Windows: devuelve el nombre de archivo de la biblioteca de tiempo de " +"ejecución de VC usada por Python, y por los módulos de extensión. Si no se " +"puede determinar el nombre de la biblioteca, se devuelve ``None``." #: ../Doc/library/ctypes.rst:1913 msgid "" @@ -1944,6 +2661,9 @@ msgid "" "with a call to the ``free(void *)``, it is important that you use the " "function in the same library that allocated the memory." msgstr "" +"Si necesita liberar memoria, por ejemplo, asignada por un módulo de " +"extensión con una llamada al ``free(void *)``, es importante que utilice la " +"función en la misma biblioteca que asignó la memoria." #: ../Doc/library/ctypes.rst:1920 msgid "" @@ -1951,6 +2671,9 @@ msgid "" "error code is specified, the last error code is used by calling the Windows " "api function GetLastError." msgstr "" +"Sólo Windows: Devuelve una descripción textual del código de error *code*. " +"Si no se especifica ningún código de error, se utiliza el último código de " +"error llamando a la función de api de Windows GetLastError." #: ../Doc/library/ctypes.rst:1927 msgid "" @@ -1958,30 +2681,42 @@ msgid "" "thread. This function calls the Windows `GetLastError()` function directly, " "it does not return the ctypes-private copy of the error code." msgstr "" +"Sólo Windows: Devuelve el último código de error establecido por Windows en " +"el hilo de llamada. Esta función llama directamente a la función " +"`GetLastError()` de Windows, no devuelve la copia ctypes-private del código " +"de error." #: ../Doc/library/ctypes.rst:1933 msgid "" "Returns the current value of the ctypes-private copy of the system :data:" "`errno` variable in the calling thread." msgstr "" +"Devuelve el valor actual de la copia ctypes-private de la variable de " +"sistema :data:`errno` en el hilo de llamada." #: ../Doc/library/ctypes.rst:1936 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_errno`` with no " "arguments." msgstr "" +"Lanza un :ref:`auditing event ` ``ctypes.get_errno`` sin " +"argumentos." #: ../Doc/library/ctypes.rst:1940 msgid "" "Windows only: returns the current value of the ctypes-private copy of the " "system :data:`LastError` variable in the calling thread." msgstr "" +"Sólo Windows: devuelve el valor actual de la copia ctypes-private de la " +"variable de sistema :data:`LastError` en el hilo de llamada." #: ../Doc/library/ctypes.rst:1943 msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_last_error`` with no " "arguments." msgstr "" +"Lanza un :ref:`auditing event ` ``ctypes.get_last_error`` sin " +"argumentos." #: ../Doc/library/ctypes.rst:1947 msgid "" @@ -1989,6 +2724,9 @@ msgid "" "*src* to *dst*. *dst* and *src* must be integers or ctypes instances that " "can be converted to pointers." msgstr "" +"Igual que la función estándar de la biblioteca C memmove: copia *count* " +"bytes de *src* a *dst*. *dst* y *src* deben ser enteros o instancias ctypes " +"que pueden ser convertidos en punteros." #: ../Doc/library/ctypes.rst:1954 msgid "" @@ -1996,6 +2734,9 @@ msgid "" "address *dst* with *count* bytes of value *c*. *dst* must be an integer " "specifying an address, or a ctypes instance." msgstr "" +"Igual que la función estándar de la biblioteca del memset C: llena el bloque " +"de memoria en la dirección *dst* con *count* bytes de valor *c*. *dst* debe " +"ser un número entero que especifique una dirección, o una instancia ctypes." #: ../Doc/library/ctypes.rst:1961 msgid "" @@ -2003,18 +2744,26 @@ msgid "" "types are cached and reused internally, so calling this function repeatedly " "is cheap. *type* must be a ctypes type." msgstr "" +"Esta función de fábrica crea y devuelve un nuevo tipo de puntero ctypes. Los " +"tipos de puntero se almacenan en caché y se reutilizan internamente, por lo " +"que llamar a esta función repetidamente es barato. *type* debe ser un tipo " +"ctypes." #: ../Doc/library/ctypes.rst:1968 msgid "" "This function creates a new pointer instance, pointing to *obj*. The " "returned object is of the type ``POINTER(type(obj))``." msgstr "" +"Esta función crea una nueva instancia de puntero, apuntando a *obj*. El " +"objeto devuelto es del tipo ``POINTER(tipo(obj))``." #: ../Doc/library/ctypes.rst:1971 msgid "" "Note: If you just want to pass a pointer to an object to a foreign function " "call, you should use ``byref(obj)`` which is much faster." msgstr "" +"Nota: Si sólo quieres pasar un puntero a un objeto a una llamada de función " +"foránea, deberías usar ``byref(obj)`` que es mucho más rápido." #: ../Doc/library/ctypes.rst:1977 msgid "" @@ -2023,18 +2772,26 @@ msgid "" "than the native size of the objects type, as given by ``sizeof(type(obj))``, " "but it is possible to enlarge the buffer." msgstr "" +"Esta función redimensiona el búfer de memoria interna de *obj*, que debe ser " +"una instancia de tipo ctypes. No es posible hacer el buffer más pequeño que " +"el tamaño nativo del tipo de objetos, como lo indica ``size of " +"(type(obj))``, pero es posible agrandar el buffer." #: ../Doc/library/ctypes.rst:1985 msgid "" "Set the current value of the ctypes-private copy of the system :data:`errno` " "variable in the calling thread to *value* and return the previous value." msgstr "" +"Poner el valor actual de la copia ctypes-private de la variable del sistema :" +"data:`errno` en el hilo de llamada a *valor* y devolver el valor anterior." #: ../Doc/library/ctypes.rst:1988 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " "argument ``errno``." msgstr "" +"Lanza un :ref:`auditing event ` ``ctypes.set_errno`` con argumento " +"``errno``." #: ../Doc/library/ctypes.rst:1993 msgid "" @@ -2042,18 +2799,25 @@ msgid "" "system :data:`LastError` variable in the calling thread to *value* and " "return the previous value." msgstr "" +"Sólo para Windows: pone el valor actual de la copia ctypes-private de la " +"variable del sistema :data:`LastError` en el hilo de llamada a *valor* y " +"devuelve el valor anterior." #: ../Doc/library/ctypes.rst:1997 msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_last_error`` with " "argument ``error``." msgstr "" +"Lanza un :ref:`auditing event ` ``ctypes.set_last_error`` con " +"argumento ``error``." #: ../Doc/library/ctypes.rst:2002 msgid "" "Returns the size in bytes of a ctypes type or instance memory buffer. Does " "the same as the C ``sizeof`` operator." msgstr "" +"Devuelve el tamaño en bytes de un buffer de memoria tipo ctypes o instancia. " +"Hace lo mismo que el operador C ``sizeof``." #: ../Doc/library/ctypes.rst:2008 msgid "" @@ -2061,12 +2825,17 @@ msgid "" "bytes object. If size is specified, it is used as size, otherwise the string " "is assumed to be zero-terminated." msgstr "" +"Esta función devuelve la cadena C que comienza en la dirección de memoria " +"*address* como un objeto de bytes. Si se especifica el tamaño, se utiliza " +"como tamaño, de lo contrario se asume que la cadena tiene un final cero." #: ../Doc/library/ctypes.rst:2012 msgid "" "Raises an :ref:`auditing event ` ``ctypes.string_at`` with " "arguments ``address``, ``size``." msgstr "" +"Lanza un :ref:`auditing event ` ``ctypes.string_at`` con " +"argumentos ``address``, ``size``." #: ../Doc/library/ctypes.rst:2017 msgid "" @@ -2076,10 +2845,15 @@ msgid "" "specified, :func:`FormatError` is called to get a textual description of the " "error." msgstr "" +"Sólo para Windows: esta función es probablemente la cosa peor nombrada de " +"los ctypes. Crea una instancia de OSError. Si no se especifica el *code*, " +"se llama a \"GetLastError\" para determinar el código de error. Si no se " +"especifica *descr*, se llama a :func:`FormatError`` para obtener una " +"descripción textual del error." #: ../Doc/library/ctypes.rst:2023 msgid "An instance of :exc:`WindowsError` used to be created." -msgstr "" +msgstr "Una instancia de :exc:`WindowsError` solía ser creada." #: ../Doc/library/ctypes.rst:2029 msgid "" @@ -2088,16 +2862,22 @@ msgid "" "characters of the string, otherwise the string is assumed to be zero-" "terminated." msgstr "" +"Esta función devuelve la cadena de caracteres anchos que comienza en la " +"dirección de memoria *address* como una cadena. Si se especifica *size*, se " +"utiliza como el número de caracteres de la cadena, de lo contrario se asume " +"que la cadena tiene un final cero." #: ../Doc/library/ctypes.rst:2034 msgid "" "Raises an :ref:`auditing event ` ``ctypes.wstring_at`` with " "arguments ``address``, ``size``." msgstr "" +"Lanza un :ref:`auditing event ` ``ctypes.wstring_at`` con " +"argumentos ``address``, ``size``." #: ../Doc/library/ctypes.rst:2040 msgid "Data types" -msgstr "" +msgstr "Tipos de datos" #: ../Doc/library/ctypes.rst:2045 msgid "" @@ -2108,12 +2888,21 @@ msgid "" "attr:`_objects`; this contains other Python objects that need to be kept " "alive in case the memory block contains pointers." msgstr "" +"Esta clase no pública es la clase de base común de todos los tipos de datos " +"de los ctypes. Entre otras cosas, todas las instancias de tipo ctypes " +"contienen un bloque de memoria que contiene datos compatibles con C; la " +"dirección del bloque de memoria es devuelta por la función de ayuda :func:" +"`addressof`. Otra variable de instancia se expone como :attr:`_objetos`; " +"ésta contiene otros objetos de Python que deben mantenerse vivos en caso de " +"que el bloque de memoria contenga punteros." #: ../Doc/library/ctypes.rst:2052 msgid "" "Common methods of ctypes data types, these are all class methods (to be " "exact, they are methods of the :term:`metaclass`):" msgstr "" +"Métodos comunes de tipos de datos ctypes, estos son todos métodos de clase " +"(para ser exactos, son métodos del :término:`metaclass`):" #: ../Doc/library/ctypes.rst:2057 msgid "" @@ -2123,12 +2912,19 @@ msgid "" "in bytes; the default is zero. If the source buffer is not large enough a :" "exc:`ValueError` is raised." msgstr "" +"Este método devuelve una instancia ctypes que comparte el buffer del objeto " +"*source*. El objeto *source* debe soportar la interfaz del buffer de " +"escritura. El parámetro opcional *offset* especifica un offset en el buffer " +"de la fuente en bytes; el valor por defecto es cero. Si el buffer de la " +"fuente no es lo suficientemente grande se lanza un :exc:`ValueError`." #: ../Doc/library/ctypes.rst:2063 ../Doc/library/ctypes.rst:2073 msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata/buffer`` with " "arguments ``pointer``, ``size``, ``offset``." msgstr "" +"Lanza un :ref:`auditing event ` ``ctypes.cdata/buffer`` con " +"argumentos ``pointer``, ``size``, ``offset``." #: ../Doc/library/ctypes.rst:2067 msgid "" @@ -2137,23 +2933,34 @@ msgid "" "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 "" +"Este método crea una instancia ctypes, copiando el buffer del buffer de " +"objetos *source* que debe ser legible. El parámetro opcional *offset* " +"especifica un offset en el buffer de origen en bytes; el valor por defecto " +"es cero. Si el buffer de fuente no es lo suficientemente grande se lanza " +"un :exc:`ValueError`." #: ../Doc/library/ctypes.rst:2077 msgid "" "This method returns a ctypes type instance using the memory specified by " "*address* which must be an integer." msgstr "" +"Este método devuelve una instancia de tipo ctypes utilizando la memoria " +"especificada por *address* que debe ser un entero." msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata`` with argument " "``address``." msgstr "" +"Lanza un :ref:`auditing event ` ``ctypes.cdata`` con argumento " +"``address``." #: ../Doc/library/ctypes.rst:2082 msgid "" "This method, and others that indirectly call this method, raises an :ref:" "`auditing event ` ``ctypes.cdata`` with argument ``address``." msgstr "" +"Este método, y otros que indirectamente llaman a este método, lanzan un :ref:" +"`auditing event ` ``ctypes.cdata`` con argumento ``address``." #: ../Doc/library/ctypes.rst:2088 msgid "" @@ -2162,6 +2969,10 @@ msgid "" "foreign function's :attr:`argtypes` tuple; it must return an object that can " "be used as a function call parameter." msgstr "" +"Este método adapta el *obj* a un tipo de ctypes. Se llama con el objeto " +"real usado en una llamada a una función externa cuando el tipo está presente " +"en la tupla :attr:`argtypes` de la función foránea; debe devolver un objeto " +"que pueda ser usado como parámetro de llamada a la función." #: ../Doc/library/ctypes.rst:2093 msgid "" @@ -2169,6 +2980,9 @@ msgid "" "normally returns *obj* if that is an instance of the type. Some types " "accept other objects as well." msgstr "" +"Todos los tipos de datos ctypes tienen una implementación por defecto de " +"este método de clase que normalmente devuelve *obj* si es una instancia del " +"tipo. Algunos tipos aceptan también otros objetos." #: ../Doc/library/ctypes.rst:2099 msgid "" @@ -2176,10 +2990,13 @@ msgid "" "*name* is the name of the symbol that exports the data, *library* is the " "loaded shared library." msgstr "" +"Este método devuelve una instancia de tipo ctypes exportada por una " +"biblioteca compartida. *name* es el nombre del símbolo que exporta los " +"datos, *library* es la biblioteca compartida cargada." #: ../Doc/library/ctypes.rst:2103 msgid "Common instance variables of ctypes data types:" -msgstr "" +msgstr "Variables de instancia común de los tipos de datos de ctypes:" #: ../Doc/library/ctypes.rst:2107 msgid "" @@ -2188,12 +3005,19 @@ msgid "" "`_b_base_` read-only member is the root ctypes object that owns the memory " "block." msgstr "" +"A veces, las instancias de datos ctypes no poseen el bloque de memoria que " +"contienen, sino que comparten parte del bloque de memoria de un objeto " +"base. El miembro de sólo lectura :attr:`_b_base_` es el objeto raíz ctypes " +"que posee el bloque de memoria." #: ../Doc/library/ctypes.rst:2114 msgid "" "This read-only variable is true when the ctypes data instance has allocated " "the memory block itself, false otherwise." msgstr "" +"Esta variable de sólo lectura es verdadera cuando la instancia de datos " +"ctypes ha sido asignada a el propio bloque de memoria, falsa en caso " +"contrario." #: ../Doc/library/ctypes.rst:2119 msgid "" @@ -2202,6 +3026,10 @@ msgid "" "This object is only exposed for debugging; never modify the contents of this " "dictionary." msgstr "" +"Este miembro es ``None`` o un diccionario que contiene objetos de Python que " +"deben mantenerse vivos para que el contenido del bloque de memoria sea " +"válido. Este objeto sólo se expone para su depuración; nunca modifique el " +"contenido de este diccionario." #: ../Doc/library/ctypes.rst:2132 msgid "" @@ -2211,10 +3039,16 @@ msgid "" "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 "" +"Esta clase no pública es la clase base de todos los tipos de datos de ctypos " +"fundamentales. Se menciona aquí porque contiene los atributos comunes de los " +"tipos de datos de ctypes fundamentales. :class:`_SimpleCData` es una " +"subclase de :class:`_CData`, por lo que hereda sus métodos y atributos. Los " +"tipos de datos ctypes que no son y no contienen punteros ahora pueden ser " +"archivados." #: ../Doc/library/ctypes.rst:2138 msgid "Instances have a single attribute:" -msgstr "" +msgstr "Los instancias tienen un solo atributo:" #: ../Doc/library/ctypes.rst:2142 msgid "" @@ -2223,6 +3057,10 @@ msgid "" "character bytes object or string, for character pointer types it is a Python " "bytes object or string." msgstr "" +"Este atributo contiene el valor real de la instancia. Para los tipos enteros " +"y punteros, es un entero, para los tipos de caracteres, es un objeto o " +"cadena de bytes de un solo carácter, para los tipos de punteros de " +"caracteres es un objeto o cadena de bytes de Python." #: ../Doc/library/ctypes.rst:2147 msgid "" @@ -2231,6 +3069,10 @@ msgid "" "original object return, always a new object is constructed. The same is " "true for all other ctypes object instances." msgstr "" +"Cuando el atributo ``value`` se recupera de una instancia ctypes, " +"normalmente se devuelve un nuevo objeto cada vez. :mod:``ctypes`` *no* " +"implementa el retorno del objeto original, siempre se construye un nuevo " +"objeto. Lo mismo ocurre con todas las demás instancias de objetos ctypes." #: ../Doc/library/ctypes.rst:2153 msgid "" @@ -2240,6 +3082,12 @@ msgid "" "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 "" +"Los tipos de datos fundamentales, cuando se devuelven como resultados de " +"llamadas de funciones foráneas, o, por ejemplo, al recuperar miembros de " +"campo de estructura o elementos de arreglos, se convierten de forma " +"transparente a tipos nativos de Python. En otras palabras, si una función " +"externa tiene un :attr:`restype` de :class:`c_char_p`, siempre recibirá un " +"objeto de bytes Python, *no* una instancia de :class:`c_char_p`." #: ../Doc/library/ctypes.rst:2161 msgid "" @@ -2248,10 +3096,15 @@ msgid "" "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 "" +"Las subclases de los tipos de datos fundamentales *no* heredan este " +"comportamiento. Así, si una función externa :attr:`restype` es una subclase " +"de :class:`c_void_p`, recibirás una instancia de esta subclase desde la " +"llamada a la función. Por supuesto, puedes obtener el valor del puntero " +"accediendo al atributo ``value``." #: ../Doc/library/ctypes.rst:2166 msgid "These are the fundamental ctypes data types:" -msgstr "" +msgstr "Estos son los tipos de datos fundamentales de ctypes:" #: ../Doc/library/ctypes.rst:2170 msgid "" @@ -2259,6 +3112,9 @@ msgid "" "small integer. The constructor accepts an optional integer initializer; no " "overflow checking is done." msgstr "" +"Representa el tipo de datos C :c:type:`signed char`, e interpreta el valor " +"como un entero pequeño. El constructor acepta un inicializador de entero " +"opcional; no se hace ninguna comprobación de desbordamiento." #: ../Doc/library/ctypes.rst:2177 msgid "" @@ -2266,6 +3122,9 @@ msgid "" "single character. The constructor accepts an optional string initializer, " "the length of the string must be exactly one character." msgstr "" +"Representa el tipo de datos C :c:type:`char`, e interpreta el valor como un " +"solo carácter. El constructor acepta un inicializador de cadena opcional, " +"la longitud de la cadena debe ser exactamente un carácter." #: ../Doc/library/ctypes.rst:2184 msgid "" @@ -2274,12 +3133,18 @@ msgid "" "binary data, ``POINTER(c_char)`` must be used. The constructor accepts an " "integer address, or a bytes object." msgstr "" +"Representa el tipo de datos C :c:type:`char *` cuando apunta a una cadena " +"terminada en cero. Para un puntero de carácter general que también puede " +"apuntar a datos binarios, se debe usar ``POINTER(c_char)``. El constructor " +"acepta una dirección entera, o un objeto de bytes." #: ../Doc/library/ctypes.rst:2192 msgid "" "Represents the C :c:type:`double` datatype. The constructor accepts an " "optional float initializer." msgstr "" +"Representa el tipo de datos C :c:type:`double`. El constructor acepta un " +"inicializador flotante opcional." #: ../Doc/library/ctypes.rst:2198 msgid "" @@ -2287,12 +3152,17 @@ msgid "" "optional float initializer. On platforms where ``sizeof(long double) == " "sizeof(double)`` it is an alias to :class:`c_double`." msgstr "" +"Representa el tipo de datos C :c:type:`long double`. El constructor acepta " +"un inicializador flotante opcional. En las plataformas donde ``sizeof(long " +"double) == sizeof(double)`` es un alias de :class:`c_double`." #: ../Doc/library/ctypes.rst:2204 msgid "" "Represents the C :c:type:`float` datatype. The constructor accepts an " "optional float initializer." msgstr "" +"Representa el tipo de datos C :c:type:`float`. El constructor acepta un " +"inicializador flotante opcional." #: ../Doc/library/ctypes.rst:2210 msgid "" @@ -2300,56 +3170,77 @@ msgid "" "optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias to :class:`c_long`." msgstr "" +"Representa el tipo de datos C:c:type:`signed int`. El constructor acepta un " +"inicializador entero opcional; no se hace ninguna comprobación de " +"desbordamiento. En plataformas donde ``sizeof(int) == sizeof(long)`` es un " +"alias de :class:`c_long`." #: ../Doc/library/ctypes.rst:2217 msgid "" "Represents the C 8-bit :c:type:`signed int` datatype. Usually an alias for :" "class:`c_byte`." msgstr "" +"Representa el tipo de datos C 8-bit :c:type:`signed int`. Normalmente un " +"alias para :class:`c_byte`." #: ../Doc/library/ctypes.rst:2223 msgid "" "Represents the C 16-bit :c:type:`signed int` datatype. Usually an alias " "for :class:`c_short`." msgstr "" +"Representa el tipo de datos C 16-bit :c:type:`signed int`. Normalmente un " +"alias para :class:`c_short`." #: ../Doc/library/ctypes.rst:2229 msgid "" "Represents the C 32-bit :c:type:`signed int` datatype. Usually an alias " "for :class:`c_int`." msgstr "" +"Representa el tipo de datos C 32-bit :c:type:`signed int`. Normalmente un " +"alias para :class:`c_int`." #: ../Doc/library/ctypes.rst:2235 msgid "" "Represents the C 64-bit :c:type:`signed int` datatype. Usually an alias " "for :class:`c_longlong`." msgstr "" +"Representa el tipo de datos C 64-bit :c:type:`signed int`. Normalmente un " +"alias para :class:`c_longlong`." #: ../Doc/library/ctypes.rst:2241 msgid "" "Represents the C :c:type:`signed long` datatype. The constructor accepts an " "optional integer initializer; no overflow checking is done." msgstr "" +"Representa el tipo de datos C :c:type:`signed long`. El constructor acepta " +"un inicializador entero opcional; no se hace ninguna comprobación de " +"desbordamiento." #: ../Doc/library/ctypes.rst:2247 msgid "" "Represents the C :c:type:`signed long long` datatype. The constructor " "accepts an optional integer initializer; no overflow checking is done." msgstr "" +"Representa el tipo de datos C :c:type:`significado long long`. El " +"constructor acepta un inicializador entero opcional; no se hace ninguna " +"comprobación de desbordamiento." #: ../Doc/library/ctypes.rst:2253 msgid "" "Represents the C :c:type:`signed short` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" +"Representa el tipo de datos C :c:type:`signed short`. El constructor acepta " +"un inicializador entero opcional; no se hace ninguna comprobación de " +"desbordamiento." #: ../Doc/library/ctypes.rst:2259 msgid "Represents the C :c:type:`size_t` datatype." -msgstr "" +msgstr "Representa el tipo de datos C :c:type:`size_t`." #: ../Doc/library/ctypes.rst:2264 msgid "Represents the C :c:type:`ssize_t` datatype." -msgstr "" +msgstr "Representa el tipo de datos C :c:type:`ssize_t`." #: ../Doc/library/ctypes.rst:2271 msgid "" @@ -2357,6 +3248,9 @@ msgid "" "as small integer. The constructor accepts an optional integer initializer; " "no overflow checking is done." msgstr "" +"Representa el tipo de datos C :c:type:`unsigned char`, interpreta el valor " +"como un entero pequeño. El constructor acepta un inicializador entero " +"opcional; no se hace ninguna comprobación de desbordamiento." #: ../Doc/library/ctypes.rst:2278 msgid "" @@ -2364,54 +3258,77 @@ msgid "" "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 "" +"Representa el tipo de datos C :c:type:`unsigned int`. El constructor acepta " +"un inicializador entero opcional; no se hace ninguna comprobación de " +"desbordamiento. En plataformas donde ``sizeof(int) == sizeof(long)`` es un " +"alias para :class:`c_ulong`." #: ../Doc/library/ctypes.rst:2285 msgid "" "Represents the C 8-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_ubyte`." msgstr "" +"Representa el tipo de datos C 8-bit :c:type:`unsigned int`. Normalmente un " +"alias para :class:`c_ubyte`." #: ../Doc/library/ctypes.rst:2291 msgid "" "Represents the C 16-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_ushort`." msgstr "" +"Representa el tipo de datos C 16-bit :c:type:``unsigned int``. Normalmente " +"un alias para :class:`c_ushort`." #: ../Doc/library/ctypes.rst:2297 msgid "" "Represents the C 32-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_uint`." msgstr "" +"Representa el tipo de datos C 32-bit :c:type:``unsigned int``. Normalmente " +"un alias para :class:`c_uint`." #: ../Doc/library/ctypes.rst:2303 msgid "" "Represents the C 64-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_ulonglong`." msgstr "" +"Representa el tipo de datos C 64-bit :c:type:``unsigned int``. Normalmente " +"un alias para :class:`c_ulonglong`." #: ../Doc/library/ctypes.rst:2309 msgid "" "Represents the C :c:type:`unsigned long` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" +"Representa el tipo de datos C :c:type:`unsigned long`. El constructor " +"acepta un inicializador entero opcional; no se hace ninguna comprobación de " +"desbordamiento." #: ../Doc/library/ctypes.rst:2315 msgid "" "Represents the C :c:type:`unsigned long long` datatype. The constructor " "accepts an optional integer initializer; no overflow checking is done." msgstr "" +"Representa el tipo de datos C :c:type:`unsigned long long`. El constructor " +"acepta un inicializador entero opcional; no se hace ninguna comprobación de " +"desbordamiento." #: ../Doc/library/ctypes.rst:2321 msgid "" "Represents the C :c:type:`unsigned short` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" +"Representa el tipo de datos C :c:type:`unsigned short`. El constructor " +"acepta un inicializador entero opcional; no se hace ninguna comprobación de " +"desbordamiento." #: ../Doc/library/ctypes.rst:2327 msgid "" "Represents the C :c:type:`void *` type. The value is represented as " "integer. The constructor accepts an optional integer initializer." msgstr "" +"Representa el tipo C c:type:`void *`. El valor se representa como un " +"entero. El constructor acepta un inicializador entero opcional." #: ../Doc/library/ctypes.rst:2333 msgid "" @@ -2419,6 +3336,10 @@ msgid "" "single character unicode string. The constructor accepts an optional string " "initializer, the length of the string must be exactly one character." msgstr "" +"Representa el tipo de datos C :c:type:`wchar_t`, e interpreta el valor como " +"una cadena unicode de un solo carácter. El constructor acepta un " +"inicializador de cadena opcional, la longitud de la cadena debe ser " +"exactamente de un carácter." #: ../Doc/library/ctypes.rst:2340 msgid "" @@ -2426,6 +3347,9 @@ msgid "" "zero-terminated wide character string. The constructor accepts an integer " "address, or a string." msgstr "" +"Representa el tipo de datos C :c:type:`wchar_t *`, que debe ser un puntero a " +"una cadena de caracteres anchos con terminación cero. El constructor acepta " +"una dirección entera, o una cadena." #: ../Doc/library/ctypes.rst:2347 msgid "" @@ -2433,18 +3357,25 @@ msgid "" "from C99). Its value can be ``True`` or ``False``, and the constructor " "accepts any object that has a truth value." msgstr "" +"Representa el tipo de datos C :c:type:`bool` (más exactamente, :c:type:" +"`_Bool` de C99). Su valor puede ser ``True`` o ``False``, y el constructor " +"acepta cualquier objeto que tenga un valor verdadero." #: ../Doc/library/ctypes.rst:2354 msgid "" "Windows only: Represents a :c:type:`HRESULT` value, which contains success " "or error information for a function or method call." msgstr "" +"Sólo Windows: Representa un valor :c:type:`HRESULT` , que contiene " +"información de éxito o error para una llamada de función o método." #: ../Doc/library/ctypes.rst:2360 msgid "" "Represents the C :c:type:`PyObject *` datatype. Calling this without an " "argument creates a ``NULL`` :c:type:`PyObject *` pointer." msgstr "" +"Representa el tipo de datos C :c:type:`PyObject *`. Llamar esto sin un " +"argumento crea un puntero ``NULL`` :c:type:`PyObject *`." #: ../Doc/library/ctypes.rst:2363 msgid "" @@ -2453,32 +3384,40 @@ msgid "" "`DWORD`. Some useful structures like :c:type:`MSG` or :c:type:`RECT` are " "also defined." msgstr "" +"El módulo :mod:`ctypes.wintypes` proporciona otros tipos de datos " +"específicos de Windows, por ejemplo :c:type:`HWND`, :c:type:`WPARAM`, o :c:" +"type:`DWORD`. Algunas estructuras útiles como :c:type:`MSG` o :c:type:" +"`RECT` también están definidas." #: ../Doc/library/ctypes.rst:2371 msgid "Structured data types" -msgstr "" +msgstr "Tipos de datos estructurados" #: ../Doc/library/ctypes.rst:2376 msgid "Abstract base class for unions in native byte order." -msgstr "" +msgstr "Clase base abstracta para uniones en orden de bytes nativos." #: ../Doc/library/ctypes.rst:2381 msgid "Abstract base class for structures in *big endian* byte order." -msgstr "" +msgstr "Clase base abstracta para estructuras en orden de bytes *big endian*." #: ../Doc/library/ctypes.rst:2386 msgid "Abstract base class for structures in *little endian* byte order." msgstr "" +"Clase base abstracta para estructuras en orden de bytes *little endian*." #: ../Doc/library/ctypes.rst:2388 msgid "" "Structures with non-native byte order cannot contain pointer type fields, or " "any other data types containing pointer type fields." msgstr "" +"Las estructuras con un orden de bytes no nativo no pueden contener campos de " +"tipo puntero, o cualquier otro tipo de datos que contenga campos de tipo " +"puntero." #: ../Doc/library/ctypes.rst:2394 msgid "Abstract base class for structures in *native* byte order." -msgstr "" +msgstr "Clase base abstracta para estructuras en orden de bytes *native*." #: ../Doc/library/ctypes.rst:2396 msgid "" @@ -2487,6 +3426,10 @@ msgid "" "`ctypes` will create :term:`descriptor`\\s which allow reading and writing " "the fields by direct attribute accesses. These are the" msgstr "" +"La estructura concreta y los tipos de unión deben crearse subclasificando " +"uno de estos tipos, y al menos definir una variable de clase :attr:" +"`_fields_`. :mod:`ctypes` creará :term:`descriptor`\\s que permitan leer y " +"escribir los campos por accesos directos de atributos. Estos son los" #: ../Doc/library/ctypes.rst:2404 msgid "" @@ -2494,6 +3437,9 @@ msgid "" "tuples. The first item is the name of the field, the second item specifies " "the type of the field; it can be any ctypes data type." msgstr "" +"Una secuencia que define los campos de estructura. Los elementos deben ser " +"de 2 o 3 tuplas. El primer ítem es el nombre del campo, el segundo ítem " +"especifica el tipo de campo; puede ser cualquier tipo de datos ctypes." #: ../Doc/library/ctypes.rst:2408 msgid "" @@ -2501,12 +3447,18 @@ msgid "" "given. It must be a small positive integer defining the bit width of the " "field." msgstr "" +"Para los campos de tipo entero como :class:`c_int`, se puede dar un tercer " +"elemento opcional. Debe ser un pequeño entero positivo que defina el ancho " +"de bit del campo." #: ../Doc/library/ctypes.rst:2412 msgid "" "Field names must be unique within one structure or union. This is not " "checked, only one field can be accessed when names are repeated." msgstr "" +"Los nombres de los campos deben ser únicos dentro de una estructura o " +"unión. Esto no se comprueba, sólo se puede acceder a un campo cuando los " +"nombres se repiten." #: ../Doc/library/ctypes.rst:2415 msgid "" @@ -2514,6 +3466,9 @@ msgid "" "class statement that defines the Structure subclass, this allows creating " "data types that directly or indirectly reference themselves::" msgstr "" +"Es posible definir la variable de clase :attr:`_fields_` *después* de la " +"sentencia de clase que define la subclase Estructura, esto permite crear " +"tipos de datos que se refieren directa o indirectamente a sí mismos::" #: ../Doc/library/ctypes.rst:2425 msgid "" @@ -2522,6 +3477,10 @@ msgid "" "and so on). Later assignments to the :attr:`_fields_` class variable will " "raise an AttributeError." msgstr "" +"Sin embargo, la variable de clase :attr:`_fields_` debe ser definida antes " +"de que el tipo sea usado por primera vez (se crea una instancia, se llama a :" +"func:`sizeof`, y así sucesivamente). Las asignaciones posteriores a la " +"variable de clase :attr:`_fields_` lanzarán un AttributeError." #: ../Doc/library/ctypes.rst:2430 msgid "" @@ -2529,6 +3488,8 @@ msgid "" "fields of the base class plus the :attr:`_fields_` defined in the sub-" "subclass, if any." msgstr "" +"Es posible definir subclases de tipos de estructura, que heredan los campos " +"de la clase base más el :attr:`_fields_` definido en la subclase, si existe." #: ../Doc/library/ctypes.rst:2437 msgid "" @@ -2536,6 +3497,9 @@ msgid "" "fields in the instance. :attr:`_pack_` must already be defined when :attr:" "`_fields_` is assigned, otherwise it will have no effect." msgstr "" +"Un pequeño entero opcional que permite anular la alineación de los campos de " +"estructura en la instancia. :attr:`_pack_` ya debe estar definido cuando se " +"asigna :attr:`__fields_`, de lo contrario no tendrá ningún efecto." #: ../Doc/library/ctypes.rst:2444 msgid "" @@ -2543,6 +3507,9 @@ msgid "" "attr:`_anonymous_` must be already defined when :attr:`_fields_` is " "assigned, otherwise it will have no effect." msgstr "" +"Una secuencia opcional que enumera los nombres de los campos sin nombre " +"(anónimos). :attr:`_anonymous_` debe estar ya definida cuando se asigna :" +"attr:`_fields_`, de lo contrario no tendrá ningún efecto." #: ../Doc/library/ctypes.rst:2448 msgid "" @@ -2551,10 +3518,14 @@ msgid "" "accessing the nested fields directly, without the need to create the " "structure or union field." msgstr "" +"Los campos listados en esta variable deben ser campos de tipo estructura o " +"unión. :mod:`ctypes` creará descriptores en el tipo de estructura que " +"permitan acceder a los campos anidados directamente, sin necesidad de crear " +"el campo de estructura o unión." #: ../Doc/library/ctypes.rst:2453 msgid "Here is an example type (Windows)::" -msgstr "" +msgstr "Aquí hay un tipo de ejemplo (Windows)::" #: ../Doc/library/ctypes.rst:2466 msgid "" @@ -2565,6 +3536,12 @@ msgid "" "equivalent, but the former is faster since it does not need to create a " "temporary union instance::" msgstr "" +"La estructura \"TYPEDESC\" describe un tipo de datos COM, el campo ``vt`` " +"especifica cuál de los campos de unión es válido. Como el campo ``u`` está " +"definido como campo anónimo, ahora es posible acceder a los miembros " +"directamente desde la instancia TYPEDESC. ``td.lptdesc`` y ``td.u.lptdesc`` " +"son equivalentes, pero el primero es más rápido ya que no necesita crear una " +"instancia de unión temporal::" #: ../Doc/library/ctypes.rst:2478 msgid "" @@ -2573,6 +3550,10 @@ msgid "" "`_fields_` variable, the fields specified in this are appended to the fields " "of the base class." msgstr "" +"Es posible definir subclases de estructuras, que heredan los campos de la " +"clase base. Si la definición de la subclase tiene una variable :attr:" +"`_fields_` separada, los campos especificados en ella se añaden a los campos " +"de la clase base." #: ../Doc/library/ctypes.rst:2483 msgid "" @@ -2583,14 +3564,21 @@ msgid "" "initialize :attr:`_fields_` with the same name, or create new attributes for " "names not present in :attr:`_fields_`." msgstr "" +"Los constructores de estructuras y uniones aceptan tanto argumentos " +"posicionales como de palabras clave. Los argumentos posicionales se usan " +"para inicializar los campos de los miembros en el mismo orden en que " +"aparecen en :attr:`_fields_`. Los argumentos de palabras clave en el " +"constructor se interpretan como asignaciones de atributos, por lo que " +"inicializarán :attr:`_fields_` con el mismo nombre, o crearán nuevos " +"atributos para nombres no presentes en :attr:`_fields_`." #: ../Doc/library/ctypes.rst:2494 msgid "Arrays and pointers" -msgstr "" +msgstr "Arreglos y punteros" #: ../Doc/library/ctypes.rst:2498 msgid "Abstract base class for arrays." -msgstr "" +msgstr "Clase base abstracta para los arreglos." #: ../Doc/library/ctypes.rst:2500 msgid "" @@ -2601,6 +3589,12 @@ msgid "" "and slice accesses; for slice reads, the resulting object is *not* itself " "an :class:`Array`." msgstr "" +"La forma recomendada de crear tipos de arreglos concretos es multiplicando " +"cualquier tipo de datos :mod:`ctypes` con un número entero positivo. " +"Alternativamente, puedes subclasificar este tipo y definir las variables de " +"clase :attr:`_length_` y :attr:`_type_`. Los elementos del arreglo pueden " +"ser leídos y escritos usando subíndices estándar y accesos slice; para las " +"lecturas slice, el objeto resultante *no es* en sí mismo un :class:`Array`." #: ../Doc/library/ctypes.rst:2510 msgid "" @@ -2608,26 +3602,33 @@ msgid "" "range subscripts result in an :exc:`IndexError`. Will be returned by :func:" "`len`." msgstr "" +"Un número entero positivo que especifica el número de elementos del " +"conjunto. Los subíndices fuera de rango dan como resultado un :exc:" +"`IndexError`. Será devuelto por :func:`len`." #: ../Doc/library/ctypes.rst:2517 msgid "Specifies the type of each element in the array." -msgstr "" +msgstr "Especifica el tipo de cada elemento del arreglo." #: ../Doc/library/ctypes.rst:2520 msgid "" "Array subclass constructors accept positional arguments, used to initialize " "the elements in order." msgstr "" +"Los constructores de subclases de arreglos aceptan argumentos posicionales, " +"usados para inicializar los elementos en orden." #: ../Doc/library/ctypes.rst:2526 msgid "Private, abstract base class for pointers." -msgstr "" +msgstr "Clase de base privada y abstracta para los punteros." #: ../Doc/library/ctypes.rst:2528 msgid "" "Concrete pointer types are created by calling :func:`POINTER` with the type " "that will be pointed to; this is done automatically by :func:`pointer`." msgstr "" +"Los tipos de punteros concretos se crean llamando a :func:`POINTER` con el " +"tipo que será apuntado; esto se hace automáticamente por :func:`pointer`." #: ../Doc/library/ctypes.rst:2532 msgid "" @@ -2637,13 +3638,21 @@ msgid "" "the memory *before* the pointer (as in C), and out-of-range subscripts will " "probably crash with an access violation (if you're lucky)." msgstr "" +"Si un puntero apunta a un arreglo, sus elementos pueden ser leídos y " +"escritos usando accesos de subíndices y cortes estándar. Los objetos " +"punteros no tienen tamaño, así que :func:`len` lanzará un :exc:`TypeError`. " +"Los subíndices negativos se leerán de la memoria *antes* que el puntero " +"(como en C), y los subíndices fuera de rango probablemente se bloqueen con " +"una violación de acceso (si tienes suerte)." #: ../Doc/library/ctypes.rst:2542 msgid "Specifies the type pointed to." -msgstr "" +msgstr "Especifica el tipo señalado." #: ../Doc/library/ctypes.rst:2546 msgid "" "Returns the object to which to pointer points. Assigning to this attribute " "changes the pointer to point to the assigned object." msgstr "" +"Devuelve el objeto al que apuntar. Asignar a este atributo cambia el " +"puntero para que apunte al objeto asignado." From 6aa74687f24c9e168ed418f0e61b10a6d70fc616 Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Sat, 13 Jun 2020 14:47:01 -0500 Subject: [PATCH 02/34] Fix c:type instead c:tipo errors --- library/ctypes.po | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/library/ctypes.po b/library/ctypes.po index ed8bd9bc1d..5d5f4dabdf 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-05-05 12:54+0200\n" -"PO-Revision-Date: 2020-06-13 08:16-0500\n" +"PO-Revision-Date: 2020-06-13 14:46-0500\n" "Language-Team: python-doc-es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" @@ -316,7 +316,7 @@ msgstr ":class:`c_bool`" #: ../Doc/library/ctypes.rst:218 msgid ":c:type:`_Bool`" -msgstr ":c:tipo:`_Bool`" +msgstr ":c:type:`_Bool`" #: ../Doc/library/ctypes.rst:218 msgid "bool (1)" @@ -328,7 +328,7 @@ msgstr ":class:`c_char`" #: ../Doc/library/ctypes.rst:220 ../Doc/library/ctypes.rst:224 msgid ":c:type:`char`" -msgstr ":c:tipo:`char`" +msgstr ":c:type:`char`" #: ../Doc/library/ctypes.rst:220 msgid "1-character bytes object" @@ -405,7 +405,7 @@ msgstr ":clase:`c_long`" #: ../Doc/library/ctypes.rst:236 msgid ":c:type:`long`" -msgstr ":c:tipo:`long`" +msgstr ":c:type:`long`" #: ../Doc/library/ctypes.rst:238 msgid ":class:`c_ulong`" @@ -429,7 +429,7 @@ msgstr ":clase:`c_ulonglong`" #: ../Doc/library/ctypes.rst:242 msgid ":c:type:`unsigned __int64` or :c:type:`unsigned long long`" -msgstr ":c:tipo:`unsigned __int64` o :c:tipo:`unsigned long long`" +msgstr ":c:type:`unsigned __int64` o :c:type:`unsigned long long`" #: ../Doc/library/ctypes.rst:245 msgid ":class:`c_size_t`" From 61f7d742417829a67d37fd09ef821f98e23b382a Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Sat, 13 Jun 2020 17:14:27 -0500 Subject: [PATCH 03/34] Fix class and term translations --- library/ctypes.po | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/library/ctypes.po b/library/ctypes.po index 5d5f4dabdf..ba8508a30c 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-05-05 12:54+0200\n" -"PO-Revision-Date: 2020-06-13 14:46-0500\n" +"PO-Revision-Date: 2020-06-13 17:13-0500\n" "Language-Team: python-doc-es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" @@ -401,7 +401,7 @@ msgstr ":c:type:``unsigned int``" #: ../Doc/library/ctypes.rst:236 msgid ":class:`c_long`" -msgstr ":clase:`c_long`" +msgstr ":class:`c_long`" #: ../Doc/library/ctypes.rst:236 msgid ":c:type:`long`" @@ -409,7 +409,7 @@ msgstr ":c:type:`long`" #: ../Doc/library/ctypes.rst:238 msgid ":class:`c_ulong`" -msgstr ":clase:`c_ulong`" +msgstr ":class:`c_ulong`" #: ../Doc/library/ctypes.rst:238 msgid ":c:type:`unsigned long`" @@ -425,7 +425,7 @@ msgstr ":c:type:`__int64` o :c:type:`long long`" #: ../Doc/library/ctypes.rst:242 msgid ":class:`c_ulonglong`" -msgstr ":clase:`c_ulonglong`" +msgstr ":class:`c_ulonglong`" #: ../Doc/library/ctypes.rst:242 msgid ":c:type:`unsigned __int64` or :c:type:`unsigned long long`" @@ -2902,7 +2902,7 @@ msgid "" "exact, they are methods of the :term:`metaclass`):" msgstr "" "Métodos comunes de tipos de datos ctypes, estos son todos métodos de clase " -"(para ser exactos, son métodos del :término:`metaclass`):" +"(para ser exactos, son métodos del :term:`metaclass`):" #: ../Doc/library/ctypes.rst:2057 msgid "" From 213947fa02980d1778710a729b4cf67efcd4337f Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Sat, 13 Jun 2020 20:28:43 -0500 Subject: [PATCH 04/34] Fix single quotes bugs --- library/ctypes.po | 89 ++++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/library/ctypes.po b/library/ctypes.po index ba8508a30c..5b5a04ea71 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-05-05 12:54+0200\n" -"PO-Revision-Date: 2020-06-13 17:13-0500\n" +"PO-Revision-Date: 2020-06-13 20:21-0500\n" "Language-Team: python-doc-es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" @@ -31,7 +31,7 @@ msgid "" "compatible data types, and allows calling functions in DLLs or shared " "libraries. It can be used to wrap these libraries in pure Python." msgstr "" -":mod:'ctypes' es una biblioteca de funciones foraneas para Python. " +":mod:`ctypes` es una biblioteca de funciones foraneas para Python. " "Proporciona tipos de datos compatibles con C y permite llamar a funciones en " "archivos DLL o bibliotecas compartidas. Se puede utilizar para envolver " "estas bibliotecas en Python puro." @@ -46,7 +46,7 @@ msgid "" "they actually work. Since some code samples behave differently under Linux, " "Windows, or Mac OS X, they contain doctest directives in comments." msgstr "" -"Nota: Los ejemplos de código de este tutorial utilizan :mod:'doctest' para " +"Nota: Los ejemplos de código de este tutorial utilizan :mod:`doctest` para " "asegurarse de que realmente funcionan. Dado que algunos ejemplos de código " "se comportan de manera diferente en Linux, Windows o Mac OS X, contienen " "directivas de prueba en los comentarios." @@ -58,11 +58,11 @@ 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 "" -"Nota: Algunos ejemplos de código hacen referencia al tipo ctypes :" -"class:'c_int'. En las plataformas donde ''sizeof(long) á sizeof(int)'' es " -"un alias de :class:'c_long'. Por lo tanto, no debe confundirse si :" -"class:'c_long' se imprime si espera :class:'c_int' --- son en realidad del " -"mismo tipo." +"Nota: Algunos ejemplos de código hacen referencia al tipo ctypes :class:" +"`c_int`. En las plataformas donde ``sizeof(long) == sizeof(int)`` es un " +"alias de :class:`c_long`. Por lo tanto, no debe confundirse si :class:" +"`c_long` se imprime si espera :class:`c_int` --- son en realidad del mismo " +"tipo." #: ../Doc/library/ctypes.rst:33 msgid "Loading dynamic link libraries" @@ -73,7 +73,7 @@ msgid "" ":mod:`ctypes` exports the *cdll*, and on Windows *windll* and *oledll* " "objects, for loading dynamic link libraries." msgstr "" -":mod:'ctypes' exporta los objetos *cdll* y en Windows *windll* y *oledll*, " +":mod:`ctypes` exporta los objetos *cdll* y en Windows *windll* y *oledll*, " "para cargar bibliotecas de vínculos dinámicos." #: ../Doc/library/ctypes.rst:38 @@ -88,20 +88,20 @@ msgid "" msgstr "" "Las bibliotecas se cargan accediendo a ellas como atributos de estos " "objetos. *cdll* carga bibliotecas que exportan funciones utilizando la " -"convención de llamada estándar ''cdecl'', mientras que las bibliotecas " -"*windll* llaman a funciones mediante la convención de llamada ''stdcall''. " -"*oledll* también utiliza la convención de llamada ''stdcall'' y asume que " -"las funciones devuelven un código de error Windows :c:type:'HRESULT'. El " -"código de error se utiliza para generar automáticamente una excepción :" -"class:'OSError' cuando se produce un error en la llamada a la función." +"convención de llamada estándar ``cdecl``, mientras que las bibliotecas " +"*windll* llaman a funciones mediante la convención de llamada ``stdcall``. " +"*oledll* también utiliza la convención de llamada ``stdcall`` y asume que " +"las funciones devuelven un código de error Windows :c:type:`HRESULT`. El " +"código de error se utiliza para generar automáticamente una excepción :class:" +"`OSError` cuando se produce un error en la llamada a la función." #: ../Doc/library/ctypes.rst:46 msgid "" "Windows errors used to raise :exc:`WindowsError`, which is now an alias of :" "exc:`OSError`." msgstr "" -"Errores de Windows utilizados para generar :exc:'WindowsError', que ahora es " -"un alias de :exc:'OSError'." +"Errores de Windows utilizados para generar :exc:`WindowsError`, que ahora es " +"un alias de :exc:`OSError`." #: ../Doc/library/ctypes.rst:51 msgid "" @@ -257,7 +257,7 @@ msgid "" "debugging crashes (e.g. from segmentation faults produced by erroneous C " "library calls)." msgstr "" -"Sin embargo, hay suficientes maneras de bloquear Python con :mod:``ctypes``, " +"Sin embargo, hay suficientes maneras de bloquear Python con :mod:`ctypes, " "así que debes tener cuidado de todos modos. El módulo :mod:`faulthandler` " "puede ser útil para depurar bloqueos (por ejemplo, provenientes de fallos de " "segmentación producidos por llamadas erróneas a la biblioteca C)." @@ -365,7 +365,7 @@ msgstr ":class:`c_ubyte`" #: ../Doc/library/ctypes.rst:226 msgid ":c:type:`unsigned char`" -msgstr ":c:type:``unigned char`` (no asignado)" +msgstr ":c:type:`unsigned char`" #: ../Doc/library/ctypes.rst:228 msgid ":class:`c_short`" @@ -373,7 +373,7 @@ msgstr ":class:`c_short`" #: ../Doc/library/ctypes.rst:228 msgid ":c:type:`short`" -msgstr ":c:type:``short``" +msgstr ":c:type:`short`" #: ../Doc/library/ctypes.rst:230 msgid ":class:`c_ushort`" @@ -381,7 +381,7 @@ msgstr ":class:`c_ushort`" #: ../Doc/library/ctypes.rst:230 msgid ":c:type:`unsigned short`" -msgstr ":c:type:``unsigned short``" +msgstr ":c:type:`unsigned short" #: ../Doc/library/ctypes.rst:232 msgid ":class:`c_int`" @@ -389,7 +389,7 @@ msgstr ":class:`c_int`" #: ../Doc/library/ctypes.rst:232 msgid ":c:type:`int`" -msgstr ":c:type:``int``" +msgstr ":c:type:`int`" #: ../Doc/library/ctypes.rst:234 msgid ":class:`c_uint`" @@ -397,7 +397,7 @@ msgstr ":class:`c_uint`" #: ../Doc/library/ctypes.rst:234 msgid ":c:type:`unsigned int`" -msgstr ":c:type:``unsigned int``" +msgstr ":c:type:`unsigned int`" #: ../Doc/library/ctypes.rst:236 msgid ":class:`c_long`" @@ -413,7 +413,7 @@ msgstr ":class:`c_ulong`" #: ../Doc/library/ctypes.rst:238 msgid ":c:type:`unsigned long`" -msgstr ":c:type:``unsigned long``" +msgstr ":c:type:`unsigned long`" #: ../Doc/library/ctypes.rst:240 msgid ":class:`c_longlong`" @@ -622,7 +622,7 @@ msgid "" "attribute available on request." msgstr "" "Si no quieres almacenar los datos de la instancia en la variable de " -"instancia :attr:`_as_parameter_`, puedes definir una :class:``property` que " +"instancia :attr:`_as_parameter_`, puedes definir una :class:`property` que " "haga que el atributo esté disponible a petición." #: ../Doc/library/ctypes.rst:403 @@ -893,7 +893,7 @@ msgid "" "`BigEndianUnion`, and :class:`LittleEndianUnion` base classes. These " "classes cannot contain pointer fields." msgstr "" -":mod:``ctypes`` utiliza el orden de bytes nativos para las Estructuras y " +":mod:`ctypes` utiliza el orden de bytes nativos para las Estructuras y " "Uniones. Para construir estructuras con un orden de bytes no nativo, puedes " "usar una de las clases base :class:`BigEndianStructure`, :class:" "`LittleEndianStructure`, :class:`BigEndianUnion`, y :class:" @@ -1042,8 +1042,9 @@ msgid "" ":mod:`ctypes` checks for ``NULL`` when dereferencing pointers (but " "dereferencing invalid non-\\ ``NULL`` pointers would crash Python)::" msgstr "" -"mod:``ctypes`` comprueba si hay ``NULL`` cuando los punteros de referencia " -"(pero los punteros no válidos de referencia ``NULL`` se romperan en Python)::" +"mod:`ctypes` comprueba si hay ``NULL`` cuando los punteros de referencia " +"(pero los punteros no válidos de referencia no-\\ ``NULL`` se romperan en " +"Python)::" #: ../Doc/library/ctypes.rst:807 msgid "Type conversions" @@ -1083,7 +1084,7 @@ msgstr "" #: ../Doc/library/ctypes.rst:835 msgid "To set a POINTER type field to ``NULL``, you can assign ``None``::" msgstr "" -"Para poner un campo de tipo POINTER a ``NULL``, puedes asignar ``None`::" +"Para poner un campo de tipo POINTER a ``NULL``, puedes asignar ``None``::" #: ../Doc/library/ctypes.rst:842 msgid "" @@ -1153,8 +1154,8 @@ msgid "" "itself. In :mod:`ctypes`, we can define the ``cell`` class and set the :attr:" "`_fields_` attribute later, after the class statement::" msgstr "" -"porque la nueva ``cell clase`` no está disponible en la propia declaración " -"de clase. En :mod:``ctypes``, podemos definir la clase ``cell`` y establecer " +"porque la nueva ``class cell`` no está disponible en la propia declaración " +"de clase. En :mod:`ctypes`, podemos definir la clase ``cell`` y establecer " "el atributo :attr:`_fields_` más tarde, después de la declaración de clase::" #: ../Doc/library/ctypes.rst:918 @@ -1295,13 +1296,13 @@ msgid "" "with :class:`threading.local` will *not* survive across different callbacks, " "even when those calls are made from the same C thread." msgstr "" -"Además, nótese que si se llama a la función de devolución de llamada en un " -"hilo creado fuera del control de Python (por ejemplo, por el código foraneo " +"Además, nótese que sí se llama a la función de devolución de llamada en un " +"hilo creado fuera del control de Python (por ejemplo, por el código foráneo " "que llama a la devolución de llamada), ctypes crea un nuevo hilo Python " "tonto en cada invocación. Este comportamiento es correcto para la mayoría de " "los propósitos, pero significa que los valores almacenados con :class:" -"`threading.local` no *sobreviven a través de diferentes llamadas de retorno, " -"incluso cuando esas llamadas se hacen desde el mismo hilo C." +"`threading.local` *no* sobreviven a través de diferentes llamadas de " +"retorno, incluso cuando esas llamadas se hacen desde el mismo hilo C." #: ../Doc/library/ctypes.rst:1053 msgid "Accessing values exported from dlls" @@ -1495,7 +1496,7 @@ msgstr "Tipos de datos de tamaño variable" msgid "" ":mod:`ctypes` provides some support for variable-sized arrays and structures." msgstr "" -":mod:``ctypes`` proporciona algo de soporte para matrices y estructuras de " +":mod:`ctypes` proporciona algo de soporte para matrices y estructuras de " "tamaño variable." #: ../Doc/library/ctypes.rst:1200 @@ -1910,7 +1911,7 @@ msgid "" "by accessing it as attribute of a library loader instance. The result is " "cached, so repeated attribute accesses return the same library each time." msgstr "" -":meth:``getattr__`` tiene un comportamiento especial: Permite cargar una " +":meth:`__getattr__` tiene un comportamiento especial: Permite cargar una " "biblioteca compartida accediendo a ella como atributo de una instancia de " "carga de biblioteca. El resultado se almacena en caché, de modo que los " "accesos repetidos a los atributos devuelven la misma biblioteca cada vez." @@ -2235,7 +2236,7 @@ msgstr "" "funciones de fábrica deben ser llamadas con el tipo de resultado deseado y " "los tipos de argumento de la función, y pueden ser usadas como fábricas de " "decoradores, y como tales, ser aplicadas a las funciones a través de la " -"sintaxis ``@wrapper``. Ver :ref:`ctypes-callback-functions`` para ejemplos." +"sintaxis ``@wrapper``. Ver :ref:`ctypes-callback-functions` para ejemplos." #: ../Doc/library/ctypes.rst:1642 msgid "" @@ -2489,7 +2490,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.addressof`` with " "argument ``obj``." msgstr "" -"Levanta un :ref:``auditing event ` ``ctypes.addressof`` con el " +"Levanta un :ref:`auditing event ` ``ctypes.addressof`` con el " "argumento ``obj``." #: ../Doc/library/ctypes.rst:1822 @@ -3070,7 +3071,7 @@ msgid "" "true for all other ctypes object instances." msgstr "" "Cuando el atributo ``value`` se recupera de una instancia ctypes, " -"normalmente se devuelve un nuevo objeto cada vez. :mod:``ctypes`` *no* " +"normalmente se devuelve un nuevo objeto cada vez. :mod:`ctypes *no* " "implementa el retorno del objeto original, siempre se construye un nuevo " "objeto. Lo mismo ocurre con todas las demás instancias de objetos ctypes." @@ -3170,7 +3171,7 @@ msgid "" "optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias to :class:`c_long`." msgstr "" -"Representa el tipo de datos C:c:type:`signed int`. El constructor acepta un " +"Representa el tipo de datos C :c:type:`signed int`. El constructor acepta un " "inicializador entero opcional; no se hace ninguna comprobación de " "desbordamiento. En plataformas donde ``sizeof(int) == sizeof(long)`` es un " "alias de :class:`c_long`." @@ -3276,7 +3277,7 @@ msgid "" "Represents the C 16-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_ushort`." msgstr "" -"Representa el tipo de datos C 16-bit :c:type:``unsigned int``. Normalmente " +"Representa el tipo de datos C 16-bit :c:type:`unsigned int`. Normalmente " "un alias para :class:`c_ushort`." #: ../Doc/library/ctypes.rst:2297 @@ -3284,7 +3285,7 @@ msgid "" "Represents the C 32-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_uint`." msgstr "" -"Representa el tipo de datos C 32-bit :c:type:``unsigned int``. Normalmente " +"Representa el tipo de datos C 32-bit :c:type:`unsigned int`. Normalmente " "un alias para :class:`c_uint`." #: ../Doc/library/ctypes.rst:2303 @@ -3292,7 +3293,7 @@ msgid "" "Represents the C 64-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_ulonglong`." msgstr "" -"Representa el tipo de datos C 64-bit :c:type:``unsigned int``. Normalmente " +"Representa el tipo de datos C 64-bit :c:type:`unsigned int`. Normalmente " "un alias para :class:`c_ulonglong`." #: ../Doc/library/ctypes.rst:2309 From c7df6b93b5fa16287d8cf9accd0148c35165eed2 Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Sat, 13 Jun 2020 20:47:08 -0500 Subject: [PATCH 05/34] Fix single quotes remaining bugs --- library/ctypes.po | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/library/ctypes.po b/library/ctypes.po index 5b5a04ea71..583aafdd14 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -257,7 +257,7 @@ msgid "" "debugging crashes (e.g. from segmentation faults produced by erroneous C " "library calls)." msgstr "" -"Sin embargo, hay suficientes maneras de bloquear Python con :mod:`ctypes, " +"Sin embargo, hay suficientes maneras de bloquear Python con :mod:`ctypes`, " "así que debes tener cuidado de todos modos. El módulo :mod:`faulthandler` " "puede ser útil para depurar bloqueos (por ejemplo, provenientes de fallos de " "segmentación producidos por llamadas erróneas a la biblioteca C)." @@ -381,7 +381,7 @@ msgstr ":class:`c_ushort`" #: ../Doc/library/ctypes.rst:230 msgid ":c:type:`unsigned short`" -msgstr ":c:type:`unsigned short" +msgstr ":c:type:`unsigned short`" #: ../Doc/library/ctypes.rst:232 msgid ":class:`c_int`" @@ -1042,7 +1042,7 @@ msgid "" ":mod:`ctypes` checks for ``NULL`` when dereferencing pointers (but " "dereferencing invalid non-\\ ``NULL`` pointers would crash Python)::" msgstr "" -"mod:`ctypes` comprueba si hay ``NULL`` cuando los punteros de referencia " +":mod:`ctypes` comprueba si hay ``NULL`` cuando los punteros de referencia " "(pero los punteros no válidos de referencia no-\\ ``NULL`` se romperan en " "Python)::" @@ -1698,7 +1698,7 @@ msgid "" msgstr "" "Sólo Windows: Las instancias de esta clase representan bibliotecas " "compartidas cargadas, las funciones de estas bibliotecas usan la convención " -"de llamada ``stdcall``, y se supone que devuelven :c:type:``int`` por " +"de llamada ``stdcall``, y se supone que devuelven :c:type:`int` por " "defecto." #: ../Doc/library/ctypes.rst:1349 @@ -3071,7 +3071,7 @@ msgid "" "true for all other ctypes object instances." msgstr "" "Cuando el atributo ``value`` se recupera de una instancia ctypes, " -"normalmente se devuelve un nuevo objeto cada vez. :mod:`ctypes *no* " +"normalmente se devuelve un nuevo objeto cada vez. :mod:`ctypes` *no* " "implementa el retorno del objeto original, siempre se construye un nuevo " "objeto. Lo mismo ocurre con todas las demás instancias de objetos ctypes." @@ -3328,7 +3328,7 @@ msgid "" "Represents the C :c:type:`void *` type. The value is represented as " "integer. The constructor accepts an optional integer initializer." msgstr "" -"Representa el tipo C c:type:`void *`. El valor se representa como un " +"Representa el tipo C :c:type:`void *`. El valor se representa como un " "entero. El constructor acepta un inicializador entero opcional." #: ../Doc/library/ctypes.rst:2333 From 8023444a6ec037bb2adfc8141573e6bf772825f8 Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Sat, 13 Jun 2020 21:03:52 -0500 Subject: [PATCH 06/34] Fix auditing event quote --- library/ctypes.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/ctypes.po b/library/ctypes.po index 583aafdd14..fd72488ef3 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -1969,7 +1969,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlopen`` with argument " "``name``." msgstr "" -"Lanza un :ref:``auditing event ` ``ctypes.dlopen`` con el " +"Lanza un :ref:`auditing event ` ``ctypes.dlopen`` con el " "argumento ``name``." #: ../Doc/library/ctypes.rst:1512 @@ -1986,7 +1986,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym`` with arguments " "``library``, ``name``." msgstr "" -"Lanza un :ref:``auditing event ` ``ctypes.dlsym`` con argumentos " +"Lanza un :ref:`auditing event ` ``ctypes.dlsym`` con argumentos " "``library``, ``name``." #: ../Doc/library/ctypes.rst:1518 @@ -2003,7 +2003,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym/handle`` with " "arguments ``handle``, ``name``." msgstr "" -"Lanza un :ref:``auditing event ` ``ctypes.dlsym/handle`` con " +"Lanza un :ref:`auditing event ` ``ctypes.dlsym/handle`` con " "argumentos ``handle``, ``name``." #: ../Doc/library/ctypes.rst:1524 @@ -2180,7 +2180,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.seh_exception`` with " "argument ``code``." msgstr "" -"Lanza un :ref:``auditing event ` ``ctypes.seh_exception`` con el " +"Lanza un :ref:`auditing event ` ``ctypes.seh_exception`` con el " "argumento ``code``." #: ../Doc/library/ctypes.rst:1615 From a68fb9ff1649b58b5e2666534b5700cfe0ce6925 Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Sat, 13 Jun 2020 23:25:11 -0500 Subject: [PATCH 07/34] Translate auditing event reference --- library/ctypes.po | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/library/ctypes.po b/library/ctypes.po index fd72488ef3..16591d506e 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -1969,7 +1969,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlopen`` with argument " "``name``." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.dlopen`` con el " +"Lanza un :ref:`evento de auditoría ` ``ctypes.dlopen`` con el " "argumento ``name``." #: ../Doc/library/ctypes.rst:1512 @@ -1979,14 +1979,14 @@ msgid "" "used to load the library." msgstr "" "Cargar una biblioteca a través de cualquiera de estos objetos lanza un :ref:" -"`auditing event ` ``ctypes.dlopen`` con el argumento de cadena " +"`evento de auditoría ` ``ctypes.dlopen`` con el argumento de cadena " "``name``, el nombre usado para cargar la biblioteca." msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym`` with arguments " "``library``, ``name``." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.dlsym`` con argumentos " +"Lanza un :ref:`evento de auditoría ` ``ctypes.dlsym`` con argumentos " "``library``, ``name``." #: ../Doc/library/ctypes.rst:1518 @@ -2003,7 +2003,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym/handle`` with " "arguments ``handle``, ``name``." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.dlsym/handle`` con " +"Lanza un :ref:`evento de auditoría ` ``ctypes.dlsym/handle`` con " "argumentos ``handle``, ``name``." #: ../Doc/library/ctypes.rst:1524 @@ -2180,7 +2180,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.seh_exception`` with " "argument ``code``." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.seh_exception`` con el " +"Lanza un :ref:`evento de auditoría ` ``ctypes.seh_exception`` con el " "argumento ``code``." #: ../Doc/library/ctypes.rst:1615 @@ -2202,7 +2202,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.call_function`` with " "arguments ``func_pointer``, ``arguments``." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.call_function`` con " +"Lanza un :ref:`evento de auditoría ` ``ctypes.call_function`` con " "argumentos ``func_pointer``, ``arguments``." #: ../Doc/library/ctypes.rst:1623 @@ -2490,7 +2490,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.addressof`` with " "argument ``obj``." msgstr "" -"Levanta un :ref:`auditing event ` ``ctypes.addressof`` con el " +"Lanza un :ref:`evento de auditoría ` ``ctypes.addressof`` con el " "argumento ``obj``." #: ../Doc/library/ctypes.rst:1822 @@ -2572,7 +2572,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_string_buffer`` " "with arguments ``init``, ``size``." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.create_string_buffer`` " +"Lanza un :ref:`evento de auditoría ` ``ctypes.create_string_buffer`` " "con argumentos ``init``, ``size``." #: ../Doc/library/ctypes.rst:1866 @@ -2610,7 +2610,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_unicode_buffer`` " "with arguments ``init``, ``size``." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.create_unicode_buffer`` " +"Lanza un :ref:`evento de auditoría ` ``ctypes.create_unicode_buffer`` " "con argumentos ``init``, ``size``." #: ../Doc/library/ctypes.rst:1883 @@ -2700,7 +2700,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_errno`` with no " "arguments." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.get_errno`` sin " +"Lanza un :ref:`evento de auditoría ` ``ctypes.get_errno`` sin " "argumentos." #: ../Doc/library/ctypes.rst:1940 @@ -2716,7 +2716,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.get_last_error`` with no " "arguments." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.get_last_error`` sin " +"Lanza un :ref:`evento de auditoría ` ``ctypes.get_last_error`` sin " "argumentos." #: ../Doc/library/ctypes.rst:1947 @@ -2791,7 +2791,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " "argument ``errno``." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.set_errno`` con argumento " +"Lanza un :ref:`evento de auditoría ` ``ctypes.set_errno`` con argumento " "``errno``." #: ../Doc/library/ctypes.rst:1993 @@ -2809,7 +2809,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_last_error`` with " "argument ``error``." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.set_last_error`` con " +"Lanza un :ref:`evento de auditoría ` ``ctypes.set_last_error`` con " "argumento ``error``." #: ../Doc/library/ctypes.rst:2002 @@ -2835,7 +2835,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.string_at`` with " "arguments ``address``, ``size``." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.string_at`` con " +"Lanza un :ref:`evento de auditoría ` ``ctypes.string_at`` con " "argumentos ``address``, ``size``." #: ../Doc/library/ctypes.rst:2017 @@ -2873,7 +2873,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.wstring_at`` with " "arguments ``address``, ``size``." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.wstring_at`` con " +"Lanza un :ref:`evento de auditoría ` ``ctypes.wstring_at`` con " "argumentos ``address``, ``size``." #: ../Doc/library/ctypes.rst:2040 @@ -2924,7 +2924,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata/buffer`` with " "arguments ``pointer``, ``size``, ``offset``." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.cdata/buffer`` con " +"Lanza un :ref:`evento de auditoría ` ``ctypes.cdata/buffer`` con " "argumentos ``pointer``, ``size``, ``offset``." #: ../Doc/library/ctypes.rst:2067 @@ -2952,7 +2952,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata`` with argument " "``address``." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.cdata`` con argumento " +"Lanza un :ref:`evento de auditoría ` ``ctypes.cdata`` con argumento " "``address``." #: ../Doc/library/ctypes.rst:2082 @@ -2961,7 +2961,7 @@ msgid "" "`auditing event ` ``ctypes.cdata`` with argument ``address``." msgstr "" "Este método, y otros que indirectamente llaman a este método, lanzan un :ref:" -"`auditing event ` ``ctypes.cdata`` con argumento ``address``." +"`evento de auditoría ` ``ctypes.cdata`` con argumento ``address``." #: ../Doc/library/ctypes.rst:2088 msgid "" From ec7be0164969614a4231979c7f420b46be88d80d Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Sun, 14 Jun 2020 18:17:34 +0200 Subject: [PATCH 08/34] Mark these translations as fuzzy due a bug in Sphinx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These paragraph are failing with cpython/Doc/library/ctypes.rst:: WARNING: inconsistent term references in translated message. original: [], translated: [':ref:`evento de auditoría `'] Marking them as fuzzy is a workaround for now, and it will allow us to easily detect them in the future and fix them. References: * https://bugs.python.org/issue39229 * https://github.com/python/python-docs-pt-br/issues/8 There is no way to skip this check only in one paragraph yet: https://github.com/sphinx-doc/sphinx/issues/3985 --- library/ctypes.po | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/ctypes.po b/library/ctypes.po index 16591d506e..5101d7ee6c 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -1965,6 +1965,7 @@ msgstr "" "cierto, así que tienes que asignar el atributo correcto :attr:`restype` para " "usar estas funciones." +#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlopen`` with argument " "``name``." @@ -1982,6 +1983,7 @@ msgstr "" "`evento de auditoría ` ``ctypes.dlopen`` con el argumento de cadena " "``name``, el nombre usado para cargar la biblioteca." +#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym`` with arguments " "``library``, ``name``." @@ -1999,6 +2001,7 @@ msgstr "" "auditoría ``ctypes.dlsym`` con argumentos ``library`` (el objeto de la " "biblioteca) y ``name`` (el nombre del símbolo como cadena o entero)." +#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym/handle`` with " "arguments ``handle``, ``name``." @@ -2176,6 +2179,7 @@ msgstr "" "Esta excepción se lanza cuando una llamada a una función forána no puede " "convertir uno de los argumentos pasados." +#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.seh_exception`` with " "argument ``code``." @@ -2198,6 +2202,7 @@ msgstr "" "permitiendo que un gancho de auditoría reemplace la excepción con la suya " "propia." +#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.call_function`` with " "arguments ``func_pointer``, ``arguments``." From 1bfd65e7698056c5b04563cd7f0641fbabb849b2 Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Sun, 14 Jun 2020 14:06:16 -0500 Subject: [PATCH 09/34] Keep auditing event without translating according library/functions.po reference --- library/ctypes.po | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/library/ctypes.po b/library/ctypes.po index 5101d7ee6c..3a26761136 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -1970,7 +1970,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlopen`` with argument " "``name``." msgstr "" -"Lanza un :ref:`evento de auditoría ` ``ctypes.dlopen`` con el " +"Lanza un :ref:`auditing event ` ``ctypes.dlopen`` con el " "argumento ``name``." #: ../Doc/library/ctypes.rst:1512 @@ -1988,7 +1988,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym`` with arguments " "``library``, ``name``." msgstr "" -"Lanza un :ref:`evento de auditoría ` ``ctypes.dlsym`` con argumentos " +"Lanza un :ref:`auditing event ` ``ctypes.dlsym`` con argumentos " "``library``, ``name``." #: ../Doc/library/ctypes.rst:1518 @@ -2006,7 +2006,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym/handle`` with " "arguments ``handle``, ``name``." msgstr "" -"Lanza un :ref:`evento de auditoría ` ``ctypes.dlsym/handle`` con " +"Lanza un :ref:`auditing event ` ``ctypes.dlsym/handle`` con " "argumentos ``handle``, ``name``." #: ../Doc/library/ctypes.rst:1524 @@ -2184,7 +2184,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.seh_exception`` with " "argument ``code``." msgstr "" -"Lanza un :ref:`evento de auditoría ` ``ctypes.seh_exception`` con el " +"Lanza un :ref:`auditing event ` ``ctypes.seh_exception`` con el " "argumento ``code``." #: ../Doc/library/ctypes.rst:1615 @@ -2207,7 +2207,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.call_function`` with " "arguments ``func_pointer``, ``arguments``." msgstr "" -"Lanza un :ref:`evento de auditoría ` ``ctypes.call_function`` con " +"Lanza un :ref:`auditing event ` ``ctypes.call_function`` con " "argumentos ``func_pointer``, ``arguments``." #: ../Doc/library/ctypes.rst:1623 From fe1cd0dc591aea3e38333d32d72c4bee29d00493 Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Mon, 29 Jun 2020 11:12:28 -0500 Subject: [PATCH 10/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index 3a26761136..b26f23055a 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -23,7 +23,7 @@ msgstr "" #: ../Doc/library/ctypes.rst:2 msgid ":mod:`ctypes` --- A foreign function library for Python" -msgstr ":mod:`ctypes` — Una biblioteca de función foraneas para Python" +msgstr ":mod:`ctypes` --- Una biblioteca de funciones foraneas para Python" #: ../Doc/library/ctypes.rst:11 msgid "" From a5f2b86b6ebc7a2f480e867d5af3bde66f876a50 Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Mon, 29 Jun 2020 11:12:40 -0500 Subject: [PATCH 11/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index b26f23055a..a9fb0c4cb6 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -38,7 +38,7 @@ msgstr "" #: ../Doc/library/ctypes.rst:19 msgid "ctypes tutorial" -msgstr "tutorial ctypes" +msgstr "tutorial de ctypes" #: ../Doc/library/ctypes.rst:21 msgid "" From 66756479ccaf4fceb5f0476ed185641bac2c91eb Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Mon, 29 Jun 2020 11:13:15 -0500 Subject: [PATCH 12/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index a9fb0c4cb6..1b7a33b5ac 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -74,7 +74,7 @@ msgid "" "objects, for loading dynamic link libraries." msgstr "" ":mod:`ctypes` exporta los objetos *cdll* y en Windows *windll* y *oledll*, " -"para cargar bibliotecas de vínculos dinámicos." +"para cargar bibliotecas de enlaces dinámicos." #: ../Doc/library/ctypes.rst:38 msgid "" From 9036d3b15e9ce3ae2967297395b761db96d08246 Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Mon, 29 Jun 2020 11:13:32 -0500 Subject: [PATCH 13/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index 1b7a33b5ac..bbe3f29f94 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -100,7 +100,7 @@ msgid "" "Windows errors used to raise :exc:`WindowsError`, which is now an alias of :" "exc:`OSError`." msgstr "" -"Errores de Windows utilizados para generar :exc:`WindowsError`, que ahora es " +"Los errores de Windows solían generar :exc:`WindowsError`, que ahora es " "un alias de :exc:`OSError`." #: ../Doc/library/ctypes.rst:51 From 4797862ee02db99400d8b8ab9e77ef6738408546 Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Mon, 29 Jun 2020 11:14:00 -0500 Subject: [PATCH 14/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index bbe3f29f94..6de7387d5e 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -115,7 +115,7 @@ msgstr "" #: ../Doc/library/ctypes.rst:63 msgid "Windows appends the usual ``.dll`` file suffix automatically." -msgstr "Windows agrega la extensión usual ``.dll`` automáticamente." +msgstr "Windows agrega automáticamente la extensión común ``.dll``." #: ../Doc/library/ctypes.rst:66 msgid "" From b3e659ba17fb8b4933f3693ac213ae7538621ccd Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Mon, 29 Jun 2020 11:14:43 -0500 Subject: [PATCH 15/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index 6de7387d5e..af4358c55d 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -1066,7 +1066,7 @@ msgstr "" "estructura, sólo se aceptan instancias exactamente del mismo tipo. Hay " "algunas excepciones a esta regla, en las que ctypes acepta otros objetos. " "Por ejemplo, se pueden pasar instancias de arregl compatibles en lugar de " -"tipos de puntero. Así, para ``POINTER(c_int)``, ctypes acepta una matriz de " +"tipos de puntero. Así, para ``POINTER(c_int)``, ctypes acepta un arreglo de " "c_int::" #: ../Doc/library/ctypes.rst:830 From 62a97aff3c3089a14ffad2c5d8a3402ca946a4c7 Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Mon, 29 Jun 2020 11:14:52 -0500 Subject: [PATCH 16/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/ctypes.po b/library/ctypes.po index af4358c55d..7262fd231f 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -2567,8 +2567,8 @@ msgid "" "not be used." msgstr "" "Si se especifica un objeto bytes como primer argumento, el buffer se hace un " -"elemento más grande que su longitud, de modo que el último elemento de la " -"matriz es un carácter de terminación NUL. Se puede pasar un entero como " +"elemento más grande que su longitud, de modo que el último elemento del " +"arreglo es un carácter de terminación NUL. Se puede pasar un entero como " "segundo argumento que permite especificar el tamaño del arreglo si no se " "debe utilizar la longitud de los bytes." From 5631780c0bea2b255cf13e50ca9c3b3e44fd6f3c Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Mon, 29 Jun 2020 11:15:04 -0500 Subject: [PATCH 17/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index 7262fd231f..a85e52c2c2 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -1015,7 +1015,7 @@ msgstr "" "estás haciendo, al igual que en C: Puedes acceder o cambiar arbitrariamente " "las ubicaciones de memoria. Generalmente sólo usas esta característica si " "recibes un puntero de una función C, y *sabes* que el puntero en realidad " -"apunta a una matriz en lugar de a un solo elemento." +"apunta a un arreglo en lugar de a un solo elemento." #: ../Doc/library/ctypes.rst:764 msgid "" From ef3b7cd4db73fcf1a6dba2ddbe856aacca136b0e Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Mon, 29 Jun 2020 11:15:29 -0500 Subject: [PATCH 18/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index a85e52c2c2..6753db0100 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -3653,7 +3653,7 @@ msgstr "" #: ../Doc/library/ctypes.rst:2542 msgid "Specifies the type pointed to." -msgstr "Especifica el tipo señalado." +msgstr "Especifica el tipo apuntado." #: ../Doc/library/ctypes.rst:2546 msgid "" From 02208391a55ebcf54cf49a7b208398edc573d2b1 Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Mon, 29 Jun 2020 11:15:38 -0500 Subject: [PATCH 19/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index 6753db0100..3b706cffbc 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -3660,5 +3660,5 @@ msgid "" "Returns the object to which to pointer points. Assigning to this attribute " "changes the pointer to point to the assigned object." msgstr "" -"Devuelve el objeto al que apuntar. Asignar a este atributo cambia el " +"Devuelve el objeto al que apunta. Asignar a este atributo cambia el " "puntero para que apunte al objeto asignado." From 1f0a10bf9f4ab480bce7d55ede2c4c5381a6fbac Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Thu, 2 Jul 2020 08:17:13 -0500 Subject: [PATCH 20/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index 3b706cffbc..71ed7bb47b 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -2740,7 +2740,7 @@ msgid "" "address *dst* with *count* bytes of value *c*. *dst* must be an integer " "specifying an address, or a ctypes instance." msgstr "" -"Igual que la función estándar de la biblioteca del memset C: llena el bloque " +"Igual que la función de la biblioteca estándar de C *memset* C: llena el bloque " "de memoria en la dirección *dst* con *count* bytes de valor *c*. *dst* debe " "ser un número entero que especifique una dirección, o una instancia ctypes." From 840aa3abd72e0ec1d3531dd07dab299129b246e9 Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Thu, 2 Jul 2020 08:17:28 -0500 Subject: [PATCH 21/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index 71ed7bb47b..6b2d6209c9 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -2730,7 +2730,7 @@ msgid "" "*src* to *dst*. *dst* and *src* must be integers or ctypes instances that " "can be converted to pointers." msgstr "" -"Igual que la función estándar de la biblioteca C memmove: copia *count* " +"Igual que la función de la biblioteca estándar de C *memmove*: copia *count* " "bytes de *src* a *dst*. *dst* y *src* deben ser enteros o instancias ctypes " "que pueden ser convertidos en punteros." From 1593133a5aabc4d9fecd887797d93779f04fe48a Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Thu, 2 Jul 2020 08:17:38 -0500 Subject: [PATCH 22/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index 6b2d6209c9..5792d33dff 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -2176,7 +2176,7 @@ msgid "" "This exception is raised when a foreign function call cannot convert one of " "the passed arguments." msgstr "" -"Esta excepción se lanza cuando una llamada a una función forána no puede " +"Esta excepción se lanza cuando una llamada a una función foránea no puede " "convertir uno de los argumentos pasados." #, fuzzy From d62de619375617ac835d8fcba6cd1231cdb6e483 Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Thu, 2 Jul 2020 08:17:52 -0500 Subject: [PATCH 23/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index 5792d33dff..59455b5423 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -2302,7 +2302,7 @@ msgid "" "Create a C callable function (a callback function) from a Python *callable*." msgstr "" "Crear una función de llamada C (una función de devolución de llamada) a " -"partir de un *llamable* Python." +"partir de un *callable* Python." #: ../Doc/library/ctypes.rst:1686 msgid "" From 9780adfcac1b025781698aac262105102d6dad24 Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Thu, 2 Jul 2020 08:18:18 -0500 Subject: [PATCH 24/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index 59455b5423..b63b45e032 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -725,7 +725,7 @@ msgid "" "function call. This is useful to check for error return values and " "automatically raise an exception::" msgstr "" -"También puedes usar un objeto Python llamable (una función o una clase, por " +"También puedes usar un objeto Python invocable (una función o una clase, por " "ejemplo) como el atributo :attr:`restype`, si la función foranea devuelve un " "número entero. El objeto llamable será llamado con el *entero* que la " "función C devuelve, y el resultado de esta llamada será utilizado como " From a05b33712eb930524ca4a5b3a06f452d3e1d474b Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Thu, 2 Jul 2020 08:18:46 -0500 Subject: [PATCH 25/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index b63b45e032..dd149087d8 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -1067,7 +1067,7 @@ msgstr "" "algunas excepciones a esta regla, en las que ctypes acepta otros objetos. " "Por ejemplo, se pueden pasar instancias de arregl compatibles en lugar de " "tipos de puntero. Así, para ``POINTER(c_int)``, ctypes acepta un arreglo de " -"c_int::" +"*c_int*::" #: ../Doc/library/ctypes.rst:830 msgid "" From f3b777040b69cf0aa08afe99b530ff859e915e7d Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Thu, 2 Jul 2020 08:18:59 -0500 Subject: [PATCH 26/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index dd149087d8..9e42fe067d 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -1065,7 +1065,7 @@ msgstr "" "una función o como el tipo de un campo miembro en una definición de " "estructura, sólo se aceptan instancias exactamente del mismo tipo. Hay " "algunas excepciones a esta regla, en las que ctypes acepta otros objetos. " -"Por ejemplo, se pueden pasar instancias de arregl compatibles en lugar de " +"Por ejemplo, se pueden pasar instancias de arreglo compatibles en lugar de " "tipos de puntero. Así, para ``POINTER(c_int)``, ctypes acepta un arreglo de " "*c_int*::" From 4e6bc8b58b6f8104d67a3682127093defc6b0823 Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Thu, 2 Jul 2020 08:19:08 -0500 Subject: [PATCH 27/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index 9e42fe067d..7b98e0d740 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -31,7 +31,7 @@ msgid "" "compatible data types, and allows calling functions in DLLs or shared " "libraries. It can be used to wrap these libraries in pure Python." msgstr "" -":mod:`ctypes` es una biblioteca de funciones foraneas para Python. " +":mod:`ctypes` es una biblioteca de funciones foráneas para Python. " "Proporciona tipos de datos compatibles con C y permite llamar a funciones en " "archivos DLL o bibliotecas compartidas. Se puede utilizar para envolver " "estas bibliotecas en Python puro." From f0355947e05beae7a8d3be94dd41b84ea82faa07 Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Thu, 2 Jul 2020 08:19:17 -0500 Subject: [PATCH 28/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index 7b98e0d740..5a0a3c5e82 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -211,7 +211,7 @@ msgid "" "Unix epoch, and the ``GetModuleHandleA()`` function, which returns a win32 " "module handle." msgstr "" -"Puedes llamar a estas funciones como cualquier otra funcion en Python. Este " +"Puedes llamar a estas funciones como cualquier otra función en Python. Este " "ejemplo utiliza la función ``time()``, que devuelve el tiempo del sistema en " "segundos desde la época de Unix, y la función ``GetModuleHandleA()``, que " "devuelve un manejador de módulo de win32." From 0c7e076e8ba9f49cd4eb94f7e8e497836e021ab8 Mon Sep 17 00:00:00 2001 From: Sergio Infante Date: Thu, 2 Jul 2020 08:19:26 -0500 Subject: [PATCH 29/34] Update library/ctypes.po MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cristián Maureira-Fredes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index 5a0a3c5e82..a6e8fce145 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -23,7 +23,7 @@ msgstr "" #: ../Doc/library/ctypes.rst:2 msgid ":mod:`ctypes` --- A foreign function library for Python" -msgstr ":mod:`ctypes` --- Una biblioteca de funciones foraneas para Python" +msgstr ":mod:`ctypes` --- Una biblioteca de funciones foráneas para Python" #: ../Doc/library/ctypes.rst:11 msgid "" From 388f15f704acf5186f4ebc894bb10b05a8e31168 Mon Sep 17 00:00:00 2001 From: Cristian Maureira-Fredes Date: Sat, 15 Aug 2020 14:48:43 +0200 Subject: [PATCH 30/34] Arreglando build y nuevas palabras library/ctypes --- dictionaries/library_ctypes.txt | 21 ++++++++ library/ctypes.po | 92 ++++++++++++++++----------------- 2 files changed, 67 insertions(+), 46 deletions(-) create mode 100644 dictionaries/library_ctypes.txt diff --git a/dictionaries/library_ctypes.txt b/dictionaries/library_ctypes.txt new file mode 100644 index 0000000000..00433856cd --- /dev/null +++ b/dictionaries/library_ctypes.txt @@ -0,0 +1,21 @@ +dll +dlls +ctypes +char +offset +api +posix +windows +printf +postprocesar +postprocesamiento +cdecl +instanciados +argtypes +instanciados +copiándolas +GetWindowRect +DllCanUnloadNow +DllGetClassObject +redimensiona +subclasificando diff --git a/library/ctypes.po b/library/ctypes.po index a6e8fce145..9e440d96ba 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -100,8 +100,8 @@ msgid "" "Windows errors used to raise :exc:`WindowsError`, which is now an alias of :" "exc:`OSError`." msgstr "" -"Los errores de Windows solían generar :exc:`WindowsError`, que ahora es " -"un alias de :exc:`OSError`." +"Los errores de Windows solían generar :exc:`WindowsError`, que ahora es un " +"alias de :exc:`OSError`." #: ../Doc/library/ctypes.rst:51 msgid "" @@ -726,8 +726,8 @@ msgid "" "automatically raise an exception::" msgstr "" "También puedes usar un objeto Python invocable (una función o una clase, por " -"ejemplo) como el atributo :attr:`restype`, si la función foranea devuelve un " -"número entero. El objeto llamable será llamado con el *entero* que la " +"ejemplo) como el atributo :attr:`restype`, si la función foránea devuelve un " +"número entero. El objeto invocable será llamado con el *entero* que la " "función C devuelve, y el resultado de esta llamada será utilizado como " "resultado de la llamada a la función. Esto es útil para comprobar si hay " "valores de retorno de error y plantear automáticamente una excepción::" @@ -1043,7 +1043,7 @@ msgid "" "dereferencing invalid non-\\ ``NULL`` pointers would crash Python)::" msgstr "" ":mod:`ctypes` comprueba si hay ``NULL`` cuando los punteros de referencia " -"(pero los punteros no válidos de referencia no-\\ ``NULL`` se romperan en " +"(pero los punteros no válidos de referencia no-\\ ``NULL`` se romperán en " "Python)::" #: ../Doc/library/ctypes.rst:807 @@ -1176,8 +1176,8 @@ msgid "" ":mod:`ctypes` allows creating C callable function pointers from Python " "callables. These are sometimes called *callback functions*." msgstr "" -":mod:`ctypes` permite crear punteros de función llamables C a partir de los " -"llamables de Python. A veces se llaman *funciones de devolución de llamada*." +":mod:`ctypes` permite crear punteros de función invocables C a partir de los " +"invocables de Python. A veces se llaman *funciones de devolución de llamada*." #: ../Doc/library/ctypes.rst:944 msgid "" @@ -1698,8 +1698,7 @@ msgid "" msgstr "" "Sólo Windows: Las instancias de esta clase representan bibliotecas " "compartidas cargadas, las funciones de estas bibliotecas usan la convención " -"de llamada ``stdcall``, y se supone que devuelven :c:type:`int` por " -"defecto." +"de llamada ``stdcall``, y se supone que devuelven :c:type:`int` por defecto." #: ../Doc/library/ctypes.rst:1349 msgid "" @@ -1717,7 +1716,7 @@ msgid "" "function exported by these libraries, and reacquired afterwards." msgstr "" "El termino Python :term:`global interpreter lock` es lanzado antes de llamar " -"a cualquier función exportada por estas librerías, y se readquiere después." +"a cualquier función exportada por estas librerías, y se requiere después." #: ../Doc/library/ctypes.rst:1359 msgid "" @@ -1875,7 +1874,7 @@ msgid "" "underscore to not clash with exported function names:" msgstr "" "Los siguientes atributos públicos están disponibles, su nombre comienza con " -"un guión bajo para no chocar con los nombres de las funciones exportadas:" +"un guion bajo para no chocar con los nombres de las funciones exportadas:" #: ../Doc/library/ctypes.rst:1445 msgid "The system handle used to access the library." @@ -1970,8 +1969,8 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlopen`` with argument " "``name``." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.dlopen`` con el " -"argumento ``name``." +"Lanza un :ref:`auditing event ` ``ctypes.dlopen`` con el argumento " +"``name``." #: ../Doc/library/ctypes.rst:1512 msgid "" @@ -1980,8 +1979,8 @@ msgid "" "used to load the library." msgstr "" "Cargar una biblioteca a través de cualquiera de estos objetos lanza un :ref:" -"`evento de auditoría ` ``ctypes.dlopen`` con el argumento de cadena " -"``name``, el nombre usado para cargar la biblioteca." +"`evento de auditoría ` ``ctypes.dlopen`` con el argumento de " +"cadena ``name``, el nombre usado para cargar la biblioteca." #, fuzzy msgid "" @@ -2041,7 +2040,7 @@ msgstr "" #: ../Doc/library/ctypes.rst:1542 msgid "Base class for C callable foreign functions." -msgstr "Clase base para funciones foráneas C llamables." +msgstr "Clase base para funciones foráneas C invocables." #: ../Doc/library/ctypes.rst:1544 msgid "" @@ -2076,12 +2075,12 @@ msgid "" "or error checking use a ctypes data type as :attr:`restype` and assign a " "callable to the :attr:`errcheck` attribute." msgstr "" -"Es posible asignar un objeto Python llamable que no sea de tipo ctypes, en " +"Es posible asignar un objeto Python invocable que no sea de tipo ctypes, en " "este caso se supone que la función devuelve un C :c:type:`int`, y el " -"llamable se llamará con este entero, lo que permite un posterior " +"invocable se llamará con este entero, lo que permite un posterior " "procesamiento o comprobación de errores. El uso de esto está obsoleto, para " "un postprocesamiento más flexible o para la comprobación de errores utilice " -"un tipo de datos ctypes como :attr:`restype` y asigne un llamable al " +"un tipo de datos ctypes como :attr:`restype` y asigne un invocable al " "atributo :attr:`errcheck`." #: ../Doc/library/ctypes.rst:1564 @@ -2132,7 +2131,7 @@ msgid "" "Assign a Python function or another callable to this attribute. The callable " "will be called with three or more arguments:" msgstr "" -"Asigne una función Python u otra llamada a este atributo. El llamable será " +"Asigne una función Python u otra llamada a este atributo. El invocable será " "llamado con tres o más argumentos:" #: ../Doc/library/ctypes.rst:1591 @@ -2149,7 +2148,7 @@ msgid "" "callable object to check or post process the results of several functions." msgstr "" "*func* es el propio objeto de la función foránea, lo que permite reutilizar " -"el mismo objeto llamable para comprobar o postprocesar los resultados de " +"el mismo objeto invocable para comprobar o postprocesar los resultados de " "varias funciones." #: ../Doc/library/ctypes.rst:1598 @@ -2577,8 +2576,8 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_string_buffer`` " "with arguments ``init``, ``size``." msgstr "" -"Lanza un :ref:`evento de auditoría ` ``ctypes.create_string_buffer`` " -"con argumentos ``init``, ``size``." +"Lanza un :ref:`evento de auditoría ` ``ctypes." +"create_string_buffer`` con argumentos ``init``, ``size``." #: ../Doc/library/ctypes.rst:1866 msgid "" @@ -2615,8 +2614,8 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.create_unicode_buffer`` " "with arguments ``init``, ``size``." msgstr "" -"Lanza un :ref:`evento de auditoría ` ``ctypes.create_unicode_buffer`` " -"con argumentos ``init``, ``size``." +"Lanza un :ref:`evento de auditoría ` ``ctypes." +"create_unicode_buffer`` con argumentos ``init``, ``size``." #: ../Doc/library/ctypes.rst:1883 msgid "" @@ -2730,9 +2729,9 @@ msgid "" "*src* to *dst*. *dst* and *src* must be integers or ctypes instances that " "can be converted to pointers." msgstr "" -"Igual que la función de la biblioteca estándar de C *memmove*: copia *count* " -"bytes de *src* a *dst*. *dst* y *src* deben ser enteros o instancias ctypes " -"que pueden ser convertidos en punteros." +"Igual que la función de la biblioteca estándar de C *memmove*: copia " +"*count* bytes de *src* a *dst*. *dst* y *src* deben ser enteros o instancias " +"ctypes que pueden ser convertidos en punteros." #: ../Doc/library/ctypes.rst:1954 msgid "" @@ -2740,9 +2739,10 @@ msgid "" "address *dst* with *count* bytes of value *c*. *dst* must be an integer " "specifying an address, or a ctypes instance." msgstr "" -"Igual que la función de la biblioteca estándar de C *memset* C: llena el bloque " -"de memoria en la dirección *dst* con *count* bytes de valor *c*. *dst* debe " -"ser un número entero que especifique una dirección, o una instancia ctypes." +"Igual que la función de la biblioteca estándar de C *memset* C: llena el " +"bloque de memoria en la dirección *dst* con *count* bytes de valor *c*. " +"*dst* debe ser un número entero que especifique una dirección, o una " +"instancia ctypes." #: ../Doc/library/ctypes.rst:1961 msgid "" @@ -2796,8 +2796,8 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " "argument ``errno``." msgstr "" -"Lanza un :ref:`evento de auditoría ` ``ctypes.set_errno`` con argumento " -"``errno``." +"Lanza un :ref:`evento de auditoría ` ``ctypes.set_errno`` con " +"argumento ``errno``." #: ../Doc/library/ctypes.rst:1993 msgid "" @@ -2957,8 +2957,8 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata`` with argument " "``address``." msgstr "" -"Lanza un :ref:`evento de auditoría ` ``ctypes.cdata`` con argumento " -"``address``." +"Lanza un :ref:`evento de auditoría ` ``ctypes.cdata`` con " +"argumento ``address``." #: ../Doc/library/ctypes.rst:2082 msgid "" @@ -3045,7 +3045,7 @@ msgid "" "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 "" -"Esta clase no pública es la clase base de todos los tipos de datos de ctypos " +"Esta clase no pública es la clase base de todos los tipos de datos de ctypes " "fundamentales. Se menciona aquí porque contiene los atributos comunes de los " "tipos de datos de ctypes fundamentales. :class:`_SimpleCData` es una " "subclase de :class:`_CData`, por lo que hereda sus métodos y atributos. Los " @@ -3176,8 +3176,8 @@ msgid "" "optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias to :class:`c_long`." msgstr "" -"Representa el tipo de datos C :c:type:`signed int`. El constructor acepta un " -"inicializador entero opcional; no se hace ninguna comprobación de " +"Representa el tipo de datos C :c:type:`signed int`. El constructor acepta " +"un inicializador entero opcional; no se hace ninguna comprobación de " "desbordamiento. En plataformas donde ``sizeof(int) == sizeof(long)`` es un " "alias de :class:`c_long`." @@ -3282,24 +3282,24 @@ msgid "" "Represents the C 16-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_ushort`." msgstr "" -"Representa el tipo de datos C 16-bit :c:type:`unsigned int`. Normalmente " -"un alias para :class:`c_ushort`." +"Representa el tipo de datos C 16-bit :c:type:`unsigned int`. Normalmente un " +"alias para :class:`c_ushort`." #: ../Doc/library/ctypes.rst:2297 msgid "" "Represents the C 32-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_uint`." msgstr "" -"Representa el tipo de datos C 32-bit :c:type:`unsigned int`. Normalmente " -"un alias para :class:`c_uint`." +"Representa el tipo de datos C 32-bit :c:type:`unsigned int`. Normalmente un " +"alias para :class:`c_uint`." #: ../Doc/library/ctypes.rst:2303 msgid "" "Represents the C 64-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_ulonglong`." msgstr "" -"Representa el tipo de datos C 64-bit :c:type:`unsigned int`. Normalmente " -"un alias para :class:`c_ulonglong`." +"Representa el tipo de datos C 64-bit :c:type:`unsigned int`. Normalmente un " +"alias para :class:`c_ulonglong`." #: ../Doc/library/ctypes.rst:2309 msgid "" @@ -3660,5 +3660,5 @@ msgid "" "Returns the object to which to pointer points. Assigning to this attribute " "changes the pointer to point to the assigned object." msgstr "" -"Devuelve el objeto al que apunta. Asignar a este atributo cambia el " -"puntero para que apunte al objeto asignado." +"Devuelve el objeto al que apunta. Asignar a este atributo cambia el puntero " +"para que apunte al objeto asignado." From 6db745ebbcefb848bbbd81d46d6ba374a5b528b1 Mon Sep 17 00:00:00 2001 From: Cristian Maureira-Fredes Date: Sat, 22 Aug 2020 12:53:32 +0200 Subject: [PATCH 31/34] Estandarizando contenido y warnings lbrary/ctypes --- library/ctypes.po | 1236 ++++++++++++++++++++++----------------------- 1 file changed, 609 insertions(+), 627 deletions(-) diff --git a/library/ctypes.po b/library/ctypes.po index 9e440d96ba..e8c9e56cd9 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -11,13 +11,13 @@ msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-05-05 12:54+0200\n" -"PO-Revision-Date: 2020-06-13 20:21-0500\n" +"PO-Revision-Date: 2020-08-22 12:52+0200\n" "Language-Team: python-doc-es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.8.0\n" -"Last-Translator: \n" +"Last-Translator: Cristián Maureira-Fredes \n" "X-Generator: Poedit 2.3.1\n" "Language: es\n" @@ -55,8 +55,8 @@ 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 "" "Nota: Algunos ejemplos de código hacen referencia al tipo ctypes :class:" "`c_int`. En las plataformas donde ``sizeof(long) == sizeof(int)`` es un " @@ -86,14 +86,14 @@ msgid "" "error code is used to automatically raise an :class:`OSError` exception when " "the function call fails." msgstr "" -"Las bibliotecas se cargan accediendo a ellas como atributos de estos " -"objetos. *cdll* carga bibliotecas que exportan funciones utilizando la " -"convención de llamada estándar ``cdecl``, mientras que las bibliotecas " -"*windll* llaman a funciones mediante la convención de llamada ``stdcall``. " -"*oledll* también utiliza la convención de llamada ``stdcall`` y asume que " -"las funciones devuelven un código de error Windows :c:type:`HRESULT`. El " -"código de error se utiliza para generar automáticamente una excepción :class:" -"`OSError` cuando se produce un error en la llamada a la función." +"Las bibliotecas se cargan accediendo a ellas como atributos de estos objetos. " +"*cdll* carga bibliotecas que exportan funciones utilizando la convención de " +"llamada estándar ``cdecl``, mientras que las bibliotecas *windll* llaman a " +"funciones mediante la convención de llamada ``stdcall``. *oledll* también " +"utiliza la convención de llamada ``stdcall`` y asume que las funciones " +"retornan un código de error Windows :c:type:`HRESULT`. El código de error se " +"utiliza para generar automáticamente una excepción :class:`OSError` cuando se " +"produce un error en la llamada a la función." #: ../Doc/library/ctypes.rst:46 msgid "" @@ -105,12 +105,12 @@ msgstr "" #: ../Doc/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 "" -"Estos son algunos ejemplos para Windows. Tener en cuenta que ''msvcrt'' es " -"la biblioteca estándar de MS C que contiene la mayoría de las funciones C " +"Estos son algunos ejemplos para Windows. Tener en cuenta que ''msvcrt'' es la " +"biblioteca estándar de MS C que contiene la mayoría de las funciones C " "estándar y utiliza la convención de llamada cdecl::" #: ../Doc/library/ctypes.rst:63 @@ -119,10 +119,10 @@ msgstr "Windows agrega automáticamente la extensión común ``.dll``." #: ../Doc/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 "" "Acceder a la biblioteca estándar de C a través de ``cdll.msvcrt`` utilizará " "una versión obsoleta de la biblioteca que puede ser incompatible con la " @@ -131,10 +131,10 @@ msgstr "" #: ../Doc/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 "" "En Linux, se requiere especificar el nombre de archivo *incluyendo* la " @@ -161,11 +161,11 @@ msgid "" "following C prototype, and a macro is used to expose one of them as " "``GetModuleHandle`` depending on whether UNICODE is defined or not::" msgstr "" -"Nótese que las dlls del sistema win32 como ``kernel32`` y ``user32`` a " -"menudo exportan versiones ANSI y UNICODE de una función. La versión UNICODE " -"se exporta con una ``W`` añadida al nombre, mientras que la versión ANSI se " +"Nótese que las dlls del sistema win32 como ``kernel32`` y ``user32`` a menudo " +"exportan versiones ANSI y UNICODE de una función. La versión UNICODE se " +"exporta con una ``W`` añadida al nombre, mientras que la versión ANSI se " "exporta con una ``A`` añadida al nombre. La función ``GetModuleHandle`` de " -"win32, que devuelve un *manejador de módulo* para un nombre de módulo dado, " +"win32, que retorna un *manejador de módulo* para un nombre de módulo dado, " "tiene el siguiente prototipo de C, y se usa una macro para exponer uno de " "ellos como ``GetModuleHandle`` dependiendo de si UNICODE está definido o no::" @@ -193,8 +193,7 @@ msgstr "" #: ../Doc/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 "" "En Windows, algunas dlls exportan funciones no por nombre sino por ordinal. " "Se pueden acceder a estas funciones indexando el objeto dll con el número " @@ -212,14 +211,14 @@ msgid "" "module handle." msgstr "" "Puedes llamar a estas funciones como cualquier otra función en Python. Este " -"ejemplo utiliza la función ``time()``, que devuelve el tiempo del sistema en " +"ejemplo utiliza la función ``time()``, que retorna el tiempo del sistema en " "segundos desde la época de Unix, y la función ``GetModuleHandleA()``, que " -"devuelve un manejador de módulo de win32." +"retorna un manejador de módulo de win32." #: ../Doc/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 "" "Este ejemplo llama a ambas funciones con un puntero ``NULL`` (``None`` debe " "ser usado como el puntero ``NULL``)::" @@ -229,22 +228,22 @@ msgid "" ":exc:`ValueError` is raised when you call an ``stdcall`` function with the " "``cdecl`` calling convention, or vice versa::" msgstr "" -":exc:`ValueError` es lanzado cuando se llama a una función ``stdcall`` con " -"la convención de llamada ``cdecl``, o viceversa::" +":exc:`ValueError` es lanzado cuando se llama a una función ``stdcall`` con la " +"convención de llamada ``cdecl``, o viceversa::" #: ../Doc/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 "" "Para saber la convención de llamada correcta, hay que mirar en el archivo de " "encabezado C o en la documentación de la función que se quiere llamar." #: ../Doc/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` utiliza la gestión de excepciones estructurada de " "win32 para evitar que se produzcan fallos de protección general cuando se " @@ -269,16 +268,16 @@ 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 "" "Los objetos ``None``, enteros, bytes y cadenas (unicode) son los únicos " "objetos nativos de Python que pueden ser usados directamente como parámetros " "en estas llamadas a funciones. ``None`` se pasa como puntero de C ``NULL``, " "los objetos bytes y las cadenas se pasan como puntero al bloque de memoria " -"que contiene sus datos (:c:type:`char *` o :c:type:`wchar_t *`). Los " -"enteros de Python se pasan como por defecto en la plataforma como tipo :c:" -"type:`int` de C, su valor se enmascara para que encuadre en el tipo C." +"que contiene sus datos (:c:type:`char *` o :c:type:`wchar_t *`). Los enteros " +"de Python se pasan como por defecto en la plataforma como tipo :c:type:`int` " +"de C, su valor se enmascara para que encuadre en el tipo C." #: ../Doc/library/ctypes.rst:204 msgid "" @@ -295,8 +294,7 @@ msgstr "Tipos de datos fundamentales" #: ../Doc/library/ctypes.rst:213 msgid ":mod:`ctypes` defines a number of primitive C compatible data types:" msgstr "" -":mod:`ctypes` define un número de tipos de datos primitivos compatibles con " -"C:" +":mod:`ctypes` define un número de tipos de datos primitivos compatibles con C:" #: ../Doc/library/ctypes.rst:216 msgid "ctypes type" @@ -563,9 +561,9 @@ msgstr "" 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 función :func:`create_string_buffer` reemplaza a la función :func:" "`c_buffer` (que todavía está disponible como un alias), así como a la " @@ -594,9 +592,8 @@ msgid "" "so that they can be converted to the required C data type::" msgstr "" "Como se ha mencionado antes, todos los tipos de Python, excepto los enteros, " -"cadenas y objetos bytes, tienen que ser envueltos en su correspondiente " -"tipo :mod:`ctypes`, para que puedan ser convertidos al tipo de datos C " -"requerido::" +"cadenas y objetos bytes, tienen que ser envueltos en su correspondiente tipo :" +"mod:`ctypes`, para que puedan ser convertidos al tipo de datos C requerido::" #: ../Doc/library/ctypes.rst:378 msgid "Calling functions with your own custom data types" @@ -609,11 +606,11 @@ msgid "" "an :attr:`_as_parameter_` attribute and uses this as the function argument. " "Of course, it must be one of integer, string, or bytes::" msgstr "" -"También puedes personalizar la conversión de argumentos de :mod:`ctypes` " -"para permitir que las instancias de tus propias clases se usen como " -"argumentos de función. :mod:`ctypes` busca un atributo :attr:" -"`_como_parámetro_` y lo usa como argumento de función. Por supuesto, debe " -"ser uno de entero, cadena o bytes::" +"También puedes personalizar la conversión de argumentos de :mod:`ctypes` para " +"permitir que las instancias de tus propias clases se usen como argumentos de " +"función. :mod:`ctypes` busca un atributo :attr:`_como_parámetro_` y lo usa " +"como argumento de función. Por supuesto, debe ser uno de entero, cadena o " +"bytes::" #: ../Doc/library/ctypes.rst:395 msgid "" @@ -666,23 +663,23 @@ 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 "" "Si has definido tus propias clases las cuales pasas a las llamadas a " "funciones, tienes que implementar un método de clase :meth:`from_param` para " "que puedan ser usadas en la secuencia :attr:`argtypes`. El método de clase :" "meth:`from_param` recibe el objeto Python que se le pasa a la llamada a " "función, debería hacer una comprobación de tipo o lo que sea necesario para " -"asegurarse de que este objeto es aceptable, y luego devolver el objeto en " -"sí, su atributo :attr:`_as_parameter_`, o lo que se quiera pasar como " -"argumento de la función C en este caso. De nuevo, el resultado debe ser un " -"entero, una cadena, unos bytes, una instancia :mod:`ctypes`, o un objeto con " -"el atributo :attr:`__as_parameter_`." +"asegurarse de que este objeto es aceptable, y luego retornar el objeto en sí, " +"su atributo :attr:`_as_parameter_`, o lo que se quiera pasar como argumento " +"de la función C en este caso. De nuevo, el resultado debe ser un entero, una " +"cadena, unos bytes, una instancia :mod:`ctypes`, o un objeto con el atributo :" +"attr:`__as_parameter_`." #: ../Doc/library/ctypes.rst:445 msgid "Return types" @@ -691,10 +688,10 @@ msgstr "Tipos de retorno" #: ../Doc/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 "" -"Por defecto, se supone que las funciones devuelven el tipo C :c:type:`int`. " +"Por defecto, se supone que las funciones retornan el tipo C :c:type:`int`. " "Se pueden especificar otros tipos de retorno estableciendo el atributo :attr:" "`restype` del objeto de la función." @@ -703,45 +700,45 @@ msgid "" "Here is a more advanced example, it uses the ``strchr`` function, which " "expects a string pointer and a char, and returns a pointer to a string::" msgstr "" -"Aquí hay un ejemplo más avanzado, utiliza la función``strchr``, que espera " -"un puntero de cadena y un carácter, y devuelve un puntero a una cadena::" +"Aquí hay un ejemplo más avanzado, utiliza la función``strchr``, que espera un " +"puntero de cadena y un carácter, y retorna un puntero a una cadena::" #: ../Doc/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 "" -"Si quieres evitar las llamadas ``ord(\"x\")`` de arriba, puedes establecer " -"el atributo :attr:`argtypes`, y el segundo argumento se convertirá de un " -"objeto de un solo carácter de bytes de Python a un char::" +"Si quieres evitar las llamadas ``ord(\"x\")`` de arriba, puedes establecer el " +"atributo :attr:`argtypes`, y el segundo argumento se convertirá de un objeto " +"de un solo carácter de bytes de Python a un char::" #: ../Doc/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::" msgstr "" "También puedes usar un objeto Python invocable (una función o una clase, por " -"ejemplo) como el atributo :attr:`restype`, si la función foránea devuelve un " +"ejemplo) como el atributo :attr:`restype`, si la función foránea retorna un " "número entero. El objeto invocable será llamado con el *entero* que la " -"función C devuelve, y el resultado de esta llamada será utilizado como " +"función C retorna, y el resultado de esta llamada será utilizado como " "resultado de la llamada a la función. Esto es útil para comprobar si hay " "valores de retorno de error y plantear automáticamente una excepción::" #: ../Doc/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\" es una función que llamará a la api Windows \"FormatMessage\" " "para obtener la representación de la cadena de un código de error, y " -"devolverá una excepción. ``WinError`` toma un parámetro de código de error " +"retornará una excepción. ``WinError`` toma un parámetro de código de error " "opcional, si no se usa ninguno, llama a :func:`GetLastError`` para " "recuperarlo." @@ -750,9 +747,9 @@ msgid "" "Please note that a much more powerful error checking mechanism is available " "through the :attr:`errcheck` attribute; see the reference manual for details." msgstr "" -"Tenga en cuenta que un mecanismo de comprobación de errores mucho más " -"potente está disponible a través del atributo :attr:`errcheck`; consulte el " -"manual de referencia para obtener más detalles." +"Tenga en cuenta que un mecanismo de comprobación de errores mucho más potente " +"está disponible a través del atributo :attr:`errcheck`; consulte el manual de " +"referencia para obtener más detalles." #: ../Doc/library/ctypes.rst:517 msgid "Passing pointers (or: passing parameters by reference)" @@ -775,14 +772,14 @@ 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` exporta la función :func:`byref` que se utiliza para pasar " "parámetros por referencia. El mismo efecto se puede conseguir con la " -"función :func:`pointer`, aunque :func:`pointer` hace mucho más trabajo ya " -"que construye un objeto puntero real, por lo que es más rápido usar :func:" -"`byref` si no se necesita el objeto puntero en el propio Python::" +"función :func:`pointer`, aunque :func:`pointer` hace mucho más trabajo ya que " +"construye un objeto puntero real, por lo que es más rápido usar :func:`byref` " +"si no se necesita el objeto puntero en el propio Python::" #: ../Doc/library/ctypes.rst:545 msgid "Structures and unions" @@ -795,16 +792,15 @@ msgid "" "subclass must define a :attr:`_fields_` attribute. :attr:`_fields_` must be " "a list of *2-tuples*, containing a *field name* and a *field type*." msgstr "" -"Las estructuras y uniones deben derivar de las clases base :class:" -"`Structure` y :class:`Union` que se definen en el módulo :mod:`ctypes`. Cada " -"subclase debe definir un atributo :attr:`_fields_`. :attr:`_fields_` debe " -"ser una lista de *2-tuplas*, que contenga un *nombre de campo* y un *tipo de " -"campo*." +"Las estructuras y uniones deben derivar de las clases base :class:`Structure` " +"y :class:`Union` que se definen en el módulo :mod:`ctypes`. Cada subclase " +"debe definir un atributo :attr:`_fields_`. :attr:`_fields_` debe ser una " +"lista de *2-tuplas*, que contenga un *nombre de campo* y un *tipo de campo*." #: ../Doc/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 "" "El tipo de campo debe ser un tipo :mod:`ctypes` como :class:`c_int`, o " "cualquier otro tipo :mod:`ctypes` derivado: estructura, unión, matriz, " @@ -839,8 +835,7 @@ msgstr "" #: ../Doc/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 "" "Las estructuras anidadas también pueden ser inicializadas en el constructor " "de varias maneras::" @@ -857,8 +852,8 @@ msgstr "" 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` no soporta el paso de uniones o estructuras con campos de bits " "a funciones por valor. Aunque esto puede funcionar en 32-bit x86, la " @@ -874,9 +869,9 @@ msgstr "Alineación de estructura/unión y orden de bytes" 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 "" "Por defecto, los campos de Estructura y Unión están alineados de la misma " "manera que lo hace el compilador C. Es posible anular este comportamiento " @@ -887,11 +882,11 @@ msgstr "" #: ../Doc/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` utiliza el orden de bytes nativos para las Estructuras y " "Uniones. Para construir estructuras con un orden de bytes no nativo, puedes " @@ -919,8 +914,7 @@ msgstr "Arreglos" #: ../Doc/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 "" "Los arreglos son secuencias, que contienen un número fijo de instancias del " "mismo tipo." @@ -935,8 +929,8 @@ msgstr "" #: ../Doc/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 "" "Aquí hay un ejemplo de un tipo de datos algo artificial, una estructura que " "contiene 4 POINTs entre otras cosas::" @@ -947,8 +941,8 @@ msgstr "Las instancias se crean de la manera habitual, llamando a la clase::" #: ../Doc/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 "" "El código anterior imprime una serie de líneas ``0 0``, porque el contenido " "del arreglos se inicializa con ceros." @@ -975,7 +969,7 @@ msgid "" "the object to which the pointer points, the ``i`` object above::" msgstr "" "Las instancias del puntero tienen un atributo :attr:`~_Pointer.contents` que " -"devuelve el objeto al que apunta el puntero, el objeto ``i`` arriba::" +"retorna el objeto al que apunta el puntero, el objeto ``i`` arriba::" #: ../Doc/library/ctypes.rst:722 msgid "" @@ -987,9 +981,8 @@ msgstr "" #: ../Doc/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 "" "Asignar otra instancia :class:`c_int` al atributo de contenido del puntero " "causaría que el puntero apunte al lugar de memoria donde se almacena::" @@ -1025,9 +1018,9 @@ msgid "" "returns a new type::" msgstr "" "Entre bastidores, la función :func:`pointer` hace más que simplemente crear " -"instancias de puntero, tiene que crear primero punteros *tipos*. Esto se " -"hace con la función :func:`POINTER`, que acepta cualquier tipo de :mod:" -"`ctypes`, y devuelve un nuevo tipo::" +"instancias de puntero, tiene que crear primero punteros *tipos*. Esto se hace " +"con la función :func:`POINTER`, que acepta cualquier tipo de :mod:`ctypes`, y " +"retorna un nuevo tipo::" #: ../Doc/library/ctypes.rst:780 msgid "" @@ -1055,10 +1048,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 "" "Por lo general, los ctypes hacen un control estricto de los tipos. Esto " "significa que si tienes ``POINTER(c_int)`` en la lista :attr:`argtypes` de " @@ -1078,8 +1071,8 @@ msgid "" msgstr "" "Además, si se declara explícitamente que un argumento de función es de tipo " "puntero (como ``POINTER(c_int)``) en :attr:`argtypes`, se puede pasar un " -"objeto de tipo puntero (``c_int`` en este caso) a la función. ctypes " -"aplicará la conversión :func:`byref` requerida en este caso automáticamente." +"objeto de tipo puntero (``c_int`` en este caso) a la función. ctypes aplicará " +"la conversión :func:`byref` requerida en este caso automáticamente." #: ../Doc/library/ctypes.rst:835 msgid "To set a POINTER type field to ``NULL``, you can assign ``None``::" @@ -1089,16 +1082,16 @@ msgstr "" #: ../Doc/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 "" -"A veces se tienen instancias de tipos incompatibles. En C, puedes cambiar " -"un tipo por otro tipo. :mod:`ctypes` proporciona una función :func:`cast` " -"qué puede ser usada de la misma manera. La estructura ``Bar`` definida " -"arriba acepta punteros ``POINTER(c_int)`` o arreglos :class:`c_int`` para su " -"campo ``values``, pero no instancias de otros tipos::" +"A veces se tienen instancias de tipos incompatibles. En C, puedes cambiar un " +"tipo por otro tipo. :mod:`ctypes` proporciona una función :func:`cast` qué " +"puede ser usada de la misma manera. La estructura ``Bar`` definida arriba " +"acepta punteros ``POINTER(c_int)`` o arreglos :class:`c_int`` para su campo " +"``values``, pero no instancias de otros tipos::" #: ../Doc/library/ctypes.rst:854 msgid "For these cases, the :func:`cast` function is handy." @@ -1115,17 +1108,17 @@ msgstr "" "La función :func:`cast` puede ser usada para lanzar una instancia ctypes en " "un puntero a un tipo de datos ctypes diferente. :func:`cast` toma dos " "parámetros, un objeto ctypes que es o puede ser convertido en un puntero de " -"algún tipo, y un tipo de puntero ctypes. Devuelve una instancia del segundo " +"algún tipo, y un tipo de puntero ctypes. retorna una instancia del segundo " "argumento, que hace referencia al mismo bloque de memoria que el primer " "argumento::" #: ../Doc/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 "" -"Así, :func:`cast` puede ser usado para asignar al campo ``values`` de " -"``Bar`` la estructura::" +"Así, :func:`cast` puede ser usado para asignar al campo ``values`` de ``Bar`` " +"la estructura::" #: ../Doc/library/ctypes.rst:880 msgid "Incomplete Types" @@ -1133,8 +1126,8 @@ msgstr "Tipos incompletos" #: ../Doc/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 "" "*Los Tipos Incompletos* son estructuras, uniones o matrices cuyos miembros " @@ -1154,14 +1147,14 @@ msgid "" "itself. In :mod:`ctypes`, we can define the ``cell`` class and set the :attr:" "`_fields_` attribute later, after the class statement::" msgstr "" -"porque la nueva ``class cell`` no está disponible en la propia declaración " -"de clase. En :mod:`ctypes`, podemos definir la clase ``cell`` y establecer " -"el atributo :attr:`_fields_` más tarde, después de la declaración de clase::" +"porque la nueva ``class cell`` no está disponible en la propia declaración de " +"clase. En :mod:`ctypes`, podemos definir la clase ``cell`` y establecer el " +"atributo :attr:`_fields_` más tarde, después de la declaración de clase::" #: ../Doc/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 "" "Vamos a intentarlo. Creamos dos instancias de ``cell``, y dejamos que se " "apunten una a la otra, y finalmente seguimos la cadena de punteros unas " @@ -1169,7 +1162,7 @@ msgstr "" #: ../Doc/library/ctypes.rst:939 msgid "Callback functions" -msgstr "Funciones de devolución de llamada" +msgstr "Funciones de retrollamadas (*callback*)" #: ../Doc/library/ctypes.rst:941 msgid "" @@ -1177,17 +1170,17 @@ msgid "" "callables. These are sometimes called *callback functions*." msgstr "" ":mod:`ctypes` permite crear punteros de función invocables C a partir de los " -"invocables de Python. A veces se llaman *funciones de devolución de llamada*." +"invocables de Python. A veces se llaman *funciones de retrollamada*." #: ../Doc/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 "" -"Primero, debes crear una clase para la función de devolución de llamada. La " -"clase conoce la convención de llamada, el tipo de retorno, y el número y " -"tipos de argumentos que esta función recibirá." +"Primero, debes crear una clase para la función de retrollamada. La clase " +"conoce la convención de llamada, el tipo de retorno, y el número y tipos de " +"argumentos que esta función recibirá." #: ../Doc/library/ctypes.rst:948 msgid "" @@ -1197,15 +1190,15 @@ msgid "" "calling convention." msgstr "" "La función de fábrica :func:`CFUNCTYPE`` crea tipos para las funciones de " -"devolución de llamada usando la convención de llamada ``cdecl``. En Windows, " -"la función de fábrica :func:`WINFUNCTYPE` crea tipos para funciones de " -"devolución de llamadas usando la convención de llamadas ``stdcall``." +"retrollamada usando la convención de llamada ``cdecl``. En Windows, la " +"función de fábrica :func:`WINFUNCTYPE` crea tipos para funciones de " +"retrollamadas usando la convención de llamadas ``stdcall``." #: ../Doc/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 "" "Ambas funciones de fábrica se llaman con el tipo de resultado como primer " "argumento, y las funciones de llamada de retorno con los tipos de argumentos " @@ -1219,22 +1212,22 @@ msgid "" msgstr "" "Presentaré un ejemplo aquí que utiliza la función :c:func:`qsort` de la " "biblioteca estándar de C, que se utiliza para ordenar los elementos con la " -"ayuda de una función de devolución de llamada. :c:func:`qsort` se utilizará " -"para ordenar un conjunto de números enteros::" +"ayuda de una función de retrollamada. :c:func:`qsort` se utilizará para " +"ordenar un conjunto de números enteros::" #: ../Doc/library/ctypes.rst:967 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` debe ser llamada con un puntero a los datos a ordenar, el " "número de elementos en el array de datos, el tamaño de un elemento, y un " "puntero a la función de comparación, la llamada de retorno. La llamada de " -"retorno se llamará entonces con dos punteros a los ítems, y debe devolver un " +"retorno se llamará entonces con dos punteros a los ítems, y debe retornar un " "entero negativo si el primer ítem es más pequeño que el segundo, un cero si " "son iguales, y un entero positivo en caso contrario." @@ -1243,9 +1236,9 @@ msgid "" "So our callback function receives pointers to integers, and must return an " "integer. First we create the ``type`` for the callback function::" msgstr "" -"Así que nuestra función de devolución de llamada recibe punteros a números " -"enteros, y debe devolver un número entero. Primero creamos el \"tipo\" para " -"la función de devolución de llamada:" +"Así que nuestra función de retrollamada recibe punteros a números enteros, y " +"debe retornar un número entero. Primero creamos el \"tipo\" para la función " +"de retrollamada:" #: ../Doc/library/ctypes.rst:979 msgid "" @@ -1291,18 +1284,18 @@ msgstr "" 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." -msgstr "" -"Además, nótese que sí se llama a la función de devolución de llamada en un " -"hilo creado fuera del control de Python (por ejemplo, por el código foráneo " -"que llama a la devolución de llamada), ctypes crea un nuevo hilo Python " -"tonto en cada invocación. Este comportamiento es correcto para la mayoría de " -"los propósitos, pero significa que los valores almacenados con :class:" -"`threading.local` *no* sobreviven a través de diferentes llamadas de " -"retorno, incluso cuando esas llamadas se hacen desde el mismo hilo C." +"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 "" +"Además, nótese que sí se llama a la función de retrollamada en un hilo creado " +"fuera del control de Python (por ejemplo, por el código foráneo que llama a " +"la retrollamada), ctypes crea un nuevo hilo Python tonto en cada invocación. " +"Este comportamiento es correcto para la mayoría de los propósitos, pero " +"significa que los valores almacenados con :class:`threading.local` *no* " +"sobreviven a través de diferentes llamadas de retorno, incluso cuando esas " +"llamadas se hacen desde el mismo hilo C." #: ../Doc/library/ctypes.rst:1053 msgid "Accessing values exported from dlls" @@ -1323,8 +1316,8 @@ msgstr "" #: ../Doc/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` puede acceder a valores como este con los métodos de la clase :" "meth:`in_dll` del tipo. *pythonapi* es un símbolo predefinido que da acceso " @@ -1342,8 +1335,8 @@ msgstr "" #: ../Doc/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 "" "Un ejemplo extendido que también demuestra el uso de punteros accediendo al " "puntero :c:data:`PyImport_FrozenModules` exportado por Python." @@ -1360,16 +1353,16 @@ msgid "" "could play tricks with this to provide a dynamically created collection of " "frozen modules." msgstr "" -"Este puntero está inicializado para apuntar a un arreglo de registros :c:" -"type:`struct _frozen``, terminada por uno cuyos miembros son todos ``NULL`` " -"o cero. Cuando se importa un módulo congelado, se busca en esta tabla. El " +"Este puntero está inicializado para apuntar a un arreglo de registros :c:type:" +"`struct _frozen``, terminada por uno cuyos miembros son todos ``NULL`` o " +"cero. Cuando se importa un módulo congelado, se busca en esta tabla. El " "código de terceros podría jugar con esto para proporcionar una colección " "creada dinámicamente de módulos congelados." #: ../Doc/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 "" "Así que manipular este puntero podría incluso resultar útil. Para restringir " "el tamaño del ejemplo, sólo mostramos cómo esta tabla puede ser leída con :" @@ -1405,8 +1398,7 @@ msgid "" msgstr "" "El hecho de que la Python estándar tenga un módulo congelado y un paquete " "congelado (indicado por el miembro ``tamaño`` negativo) no se conoce bien, " -"sólo se usa para hacer pruebas. Pruébalo con ``import __hello__`` por " -"ejemplo." +"sólo se usa para hacer pruebas. Pruébalo con ``import __hello__`` por ejemplo." #: ../Doc/library/ctypes.rst:1128 msgid "Surprises" @@ -1417,8 +1409,8 @@ msgid "" "There are some edges in :mod:`ctypes` where you might expect something other " "than what actually happens." msgstr "" -"Hay algunas aristas en :mod:`ctypes` en las que podrías esperar algo " -"distinto de lo que realmente sucede." +"Hay algunas aristas en :mod:`ctypes` en las que podrías esperar algo distinto " +"de lo que realmente sucede." #: ../Doc/library/ctypes.rst:1133 msgid "Consider the following example::" @@ -1429,23 +1421,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 "" -"Hm. Ciertamente esperábamos que la última declaración imprimiera ``3 4 1 " -"2``. ¿Qué ha pasado? Aquí están los pasos de la línea ``rc.a, rc.b = rc.b, " -"rc.a`` arriba::" +"Hm. Ciertamente esperábamos que la última declaración imprimiera ``3 4 1 2``. " +"¿Qué ha pasado? Aquí están los pasos de la línea ``rc.a, rc.b = rc.b, rc.a`` " +"arriba::" #: ../Doc/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 "" -"Note que ``temp0`` y ``temp1`` son objetos que todavía usan el buffer " -"interno del objeto ``rc`` de arriba. Así que ejecutando ``rc.a = temp0`` " -"copia el contenido del buffer de ``temp0`` en el buffer de ``rc``. Esto, a " -"su vez, cambia el contenido de ``temp1``. Por lo tanto, la última asignación " -"``rc.b = temp1``, no tiene el efecto esperado." +"Note que ``temp0`` y ``temp1`` son objetos que todavía usan el buffer interno " +"del objeto ``rc`` de arriba. Así que ejecutando ``rc.a = temp0`` copia el " +"contenido del buffer de ``temp0`` en el buffer de ``rc``. Esto, a su vez, " +"cambia el contenido de ``temp1``. Por lo tanto, la última asignación ``rc.b = " +"temp1``, no tiene el efecto esperado." #: ../Doc/library/ctypes.rst:1167 msgid "" @@ -1462,8 +1454,8 @@ msgid "" "Another example that may behave differently from what one would expect is " "this::" msgstr "" -"Otro ejemplo que puede comportarse de manera diferente a lo que uno " -"esperaría es este::" +"Otro ejemplo que puede comportarse de manera diferente a lo que uno esperaría " +"es este::" #: ../Doc/library/ctypes.rst:1183 msgid "" @@ -1477,9 +1469,9 @@ 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 "" "¿Por qué está imprimiendo ``False``? Las instancias ctypes son objetos que " "contienen un bloque de memoria más algunos :term:`descriptor`\\s que acceden " @@ -1502,17 +1494,17 @@ msgstr "" #: ../Doc/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 función :func:`resize` puede ser usada para redimensionar el buffer de " -"memoria de un objeto ctypes existente. La función toma el objeto como " -"primer argumento, y el tamaño solicitado en bytes como segundo argumento. " -"El bloque de memoria no puede hacerse más pequeño que el bloque de memoria " -"natural especificado por el tipo de objeto, se lanza un :exc:`ValueError` si " -"se intenta::" +"memoria de un objeto ctypes existente. La función toma el objeto como primer " +"argumento, y el tamaño solicitado en bytes como segundo argumento. El bloque " +"de memoria no puede hacerse más pequeño que el bloque de memoria natural " +"especificado por el tipo de objeto, se lanza un :exc:`ValueError` si se " +"intenta::" #: ../Doc/library/ctypes.rst:1220 msgid "" @@ -1526,12 +1518,12 @@ msgstr "" #: ../Doc/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 "" -"Otra forma de utilizar tipos de datos de tamaño variable con :mod:`ctypes` " -"es utilizar la naturaleza dinámica de Python, y (re)definir el tipo de datos " +"Otra forma de utilizar tipos de datos de tamaño variable con :mod:`ctypes` es " +"utilizar la naturaleza dinámica de Python, y (re)definir el tipo de datos " "después de que se conozca el tamaño requerido, caso por caso." #: ../Doc/library/ctypes.rst:1240 @@ -1555,9 +1547,9 @@ 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 "" "El propósito de la función :func:`find_library` es localizar una biblioteca " "de forma similar a lo que hace el compilador o el cargador en tiempo de " @@ -1568,8 +1560,8 @@ msgstr "" #: ../Doc/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 "" "El módulo :mod:`ctypes.util` proporciona una función que puede ayudar a " "determinar la biblioteca a cargar." @@ -1578,14 +1570,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 "" -"Intenta encontrar una biblioteca y devolver un nombre. *name* es el nombre " +"Intenta encontrar una biblioteca y retornar un nombre. *name* es el nombre " "de la biblioteca sin ningún prefijo como *lib*, sufijo como ``.so``, ``." "dylib`` o número de versión (esta es la forma usada para la opción del " -"enlazador posix :option:`!-l`). Si no se puede encontrar ninguna " -"biblioteca, devuelve ``None``." +"enlazador posix :option:`!-l`). Si no se puede encontrar ninguna biblioteca, " +"retorna ``None``." #: ../Doc/library/ctypes.rst:1270 ../Doc/library/ctypes.rst:1903 msgid "The exact functionality is system dependent." @@ -1599,13 +1591,12 @@ msgid "" msgstr "" "En Linux, :func:`find_library` intenta ejecutar programas externos (``/sbin/" "ldconfig``, ``gcc``, ``objdump`` y ``ld``) para encontrar el archivo de la " -"biblioteca. Devuelve el nombre del archivo de la biblioteca." +"biblioteca. retorna el nombre del archivo de la biblioteca." #: ../Doc/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 "" "En Linux, el valor de la variable de entorno ``LD_LIBRARY_PATH`` se utiliza " "cuando se buscan bibliotecas, si una biblioteca no puede ser encontrada por " @@ -1621,7 +1612,7 @@ msgid "" "paths to locate the library, and returns a full pathname if successful::" msgstr "" "En OS X, :func:`find_library` intenta varios esquemas de nombres y rutas " -"predefinidas para localizar la biblioteca, y devuelve una ruta completa si " +"predefinidas para localizar la biblioteca, y retorna una ruta completa si " "tiene éxito::" #: ../Doc/library/ctypes.rst:1305 @@ -1630,16 +1621,16 @@ msgid "" "returns the full pathname, but since there is no predefined naming scheme a " "call like ``find_library(\"c\")`` will fail and return ``None``." msgstr "" -"En Windows, :func:`find_library`` busca a lo largo de la ruta de búsqueda " -"del sistema, y devuelve la ruta completa, pero como no hay un esquema de " -"nombres predefinido, una llamada como ``find_library(\"c\")`` fallará y " -"devolverá ``None``." +"En Windows, :func:`find_library`` busca a lo largo de la ruta de búsqueda del " +"sistema, y retorna la ruta completa, pero como no hay un esquema de nombres " +"predefinido, una llamada como ``find_library(\"c\")`` fallará y retornará " +"``None``." #: ../Doc/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 envolvemos una biblioteca compartida con :mod:`ctypes`, puede ser mejor " @@ -1653,21 +1644,21 @@ msgstr "Cargando bibliotecas compartidas" #: ../Doc/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 "" "Hay varias maneras de cargar las bibliotecas compartidas en el proceso " "Python. Una forma es instanciar una de las siguientes clases:" #: ../Doc/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 "" "Las instancias de esta clase representan bibliotecas compartidas cargadas. " "Las funciones de estas bibliotecas usan la convención estándar de llamada C, " -"y se asume que devuelven :c:type:`int`." +"y se asume que retornan :c:type:`int`." #: ../Doc/library/ctypes.rst:1332 msgid "" @@ -1680,7 +1671,7 @@ msgid "" msgstr "" "Sólo Windows: Las instancias de esta clase representan bibliotecas " "compartidas cargadas, las funciones en estas bibliotecas usan la convención " -"de llamada ``stdcall``, y se asume que devuelven el código específico de " +"de llamada ``stdcall``, y se asume que retornan el código específico de " "windows :class:`HRESULT``. Los valores :class:`HRESULT`` contienen " "información que especifica si la llamada a la función falló o tuvo éxito, " "junto con un código de error adicional. Si el valor de retorno señala un " @@ -1698,7 +1689,7 @@ msgid "" msgstr "" "Sólo Windows: Las instancias de esta clase representan bibliotecas " "compartidas cargadas, las funciones de estas bibliotecas usan la convención " -"de llamada ``stdcall``, y se supone que devuelven :c:type:`int` por defecto." +"de llamada ``stdcall``, y se supone que retornan :c:type:`int` por defecto." #: ../Doc/library/ctypes.rst:1349 msgid "" @@ -1721,9 +1712,9 @@ msgstr "" #: ../Doc/library/ctypes.rst:1359 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 "" "Las instancias de esta clase se comportan como instancias :class:`CDLL` , " "excepto que el GIL de Python es *no* liberado durante la llamada a la " @@ -1740,11 +1731,11 @@ msgstr "" #: ../Doc/library/ctypes.rst:1366 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." +"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 "" "Todas estas clases pueden ser instanciadas llamándolas con al menos un " "argumento, la ruta de la biblioteca compartida. Si tienes un manejador " @@ -1757,8 +1748,7 @@ 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 "" "El parámetro *mode* puede utilizarse para especificar cómo se carga la " "biblioteca. Para más detalles, consulte la página :manpage:`dlopen(3)` " @@ -1769,10 +1759,10 @@ msgstr "" 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 "" "El parámetro *use_errno*, cuando se establece en true, habilita un mecanismo " "ctypes que permite acceder al número de error del sistema :data:`errno` de " @@ -1784,43 +1774,42 @@ msgstr "" #: ../Doc/library/ctypes.rst:1385 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 función :func:`ctypes.get_errno` devuelve el valor de la copia privada de " +"La función :func:`ctypes.get_errno` retorna el valor de la copia privada de " "ctypes, y la función :func:`ctypes.set_errno` cambia la copia privada de " -"ctypes a un nuevo valor y devuelve el valor anterior." +"ctypes a un nuevo valor y retorna el valor anterior." #: ../Doc/library/ctypes.rst:1389 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 "" -"El parámetro *use_last_error*, cuando se establece en true, habilita el " -"mismo mecanismo para el código de error de Windows que es administrado por " -"las funciones de la API de Windows :func:`GetLastError` y :func:" -"`SetLastError`; :func:`ctypes.get_last_error` y :func:`ctypes." -"set_last_error` se utilizan para solicitar y cambiar la copia privada ctypes " -"del código de error de Windows." +"El parámetro *use_last_error*, cuando se establece en true, habilita el mismo " +"mecanismo para el código de error de Windows que es administrado por las " +"funciones de la API de Windows :func:`GetLastError` y :func:`SetLastError`; :" +"func:`ctypes.get_last_error` y :func:`ctypes.set_last_error` se utilizan para " +"solicitar y cambiar la copia privada ctypes del código de error de Windows." #: ../Doc/library/ctypes.rst:1395 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 "" "El parámetro *winmode* se utiliza en Windows para especificar cómo se carga " "la biblioteca (ya que *mode* se ignora). Toma cualquier valor que sea válido " "para el parámetro flags de la API de Win32 ``LoadLibraryEx``. Cuando se " -"omite, el valor por defecto es usar los flags que resultan en la carga de " -"DLL más segura para evitar problemas como el secuestro de DLL. Pasar la ruta " +"omite, el valor por defecto es usar los flags que resultan en la carga de DLL " +"más segura para evitar problemas como el secuestro de DLL. Pasar la ruta " "completa a la DLL es la forma más segura de asegurar que se cargan la " "biblioteca y las dependencias correctas." @@ -1855,18 +1844,18 @@ msgstr "" #: ../Doc/library/ctypes.rst:1426 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 "" "Las instancias de estas clases no tienen métodos públicos. Se puede acceder " "a las funciones exportadas por la biblioteca compartida como atributos o por " "índice. Tenga en cuenta que al acceder a la función a través de un atributo " "se almacena en caché el resultado y, por lo tanto, al acceder a él " -"repetidamente se devuelve el mismo objeto cada vez. Por otro lado, acceder " -"a ella a través de un índice devuelve un nuevo objeto cada vez::" +"repetidamente se retorna el mismo objeto cada vez. Por otro lado, acceder a " +"ella a través de un índice retorna un nuevo objeto cada vez::" #: ../Doc/library/ctypes.rst:1439 msgid "" @@ -1892,9 +1881,9 @@ msgid "" "attribute of the loader instance." msgstr "" "Las bibliotecas compartidas también pueden ser cargadas usando uno de los " -"objetos prefabricados, que son instancias de la clase :class:" -"`LibraryLoader`, ya sea llamando al método :meth:`LoadLibrary`, o " -"recuperando la biblioteca como atributo de la instancia de carga." +"objetos prefabricados, que son instancias de la clase :class:`LibraryLoader`, " +"ya sea llamando al método :meth:`LoadLibrary`, o recuperando la biblioteca " +"como atributo de la instancia de carga." #: ../Doc/library/ctypes.rst:1460 msgid "" @@ -1913,15 +1902,15 @@ msgstr "" ":meth:`__getattr__` tiene un comportamiento especial: Permite cargar una " "biblioteca compartida accediendo a ella como atributo de una instancia de " "carga de biblioteca. El resultado se almacena en caché, de modo que los " -"accesos repetidos a los atributos devuelven la misma biblioteca cada vez." +"accesos repetidos a los atributos retornan la misma biblioteca cada vez." #: ../Doc/library/ctypes.rst:1469 msgid "" "Load a shared library into the process and return it. This method always " "returns a new instance of the library." msgstr "" -"Carga una biblioteca compartida en el proceso y la devuelve. Este método " -"siempre devuelve una nueva instancia de la biblioteca." +"Carga una biblioteca compartida en el proceso y la retorna. Este método " +"siempre retorna una nueva instancia de la biblioteca." #: ../Doc/library/ctypes.rst:1473 msgid "These prefabricated library loaders are available:" @@ -1945,8 +1934,8 @@ msgstr "Crea instancias de :class:`PyDLL`." #: ../Doc/library/ctypes.rst:1499 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 "" "Para acceder directamente a la API C de Python, se dispone de un objeto de " "biblioteca compartida de Python listo-para-usar:" @@ -1959,10 +1948,10 @@ msgid "" "correct :attr:`restype` attribute to use these functions." msgstr "" "Una instancia de :class:`PyDLL` que expone las funciones de la API C de " -"Python como atributos. Ten en cuenta que se supone que todas estas " -"funciones devuelven C :c:type:`int`, lo que por supuesto no siempre es " -"cierto, así que tienes que asignar el atributo correcto :attr:`restype` para " -"usar estas funciones." +"Python como atributos. Ten en cuenta que se supone que todas estas funciones " +"retornan C :c:type:`int`, lo que por supuesto no siempre es cierto, así que " +"tienes que asignar el atributo correcto :attr:`restype` para usar estas " +"funciones." #, fuzzy msgid "" @@ -1974,15 +1963,14 @@ msgstr "" #: ../Doc/library/ctypes.rst:1512 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 "" "Cargar una biblioteca a través de cualquiera de estos objetos lanza un :ref:" -"`evento de auditoría ` ``ctypes.dlopen`` con el argumento de " -"cadena ``name``, el nombre usado para cargar la biblioteca." +"`evento de auditoría ` ``ctypes.dlopen`` con el argumento de cadena " +"``name``, el nombre usado para cargar la biblioteca." -#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym`` with arguments " "``library``, ``name``." @@ -2000,7 +1988,6 @@ msgstr "" "auditoría ``ctypes.dlsym`` con argumentos ``library`` (el objeto de la " "biblioteca) y ``name`` (el nombre del símbolo como cadena o entero)." -#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym/handle`` with " "arguments ``handle``, ``name``." @@ -2014,10 +2001,10 @@ msgid "" "accessing a function raises an auditing event ``ctypes.dlsym/handle`` with " "arguments ``handle`` (the raw library handle) and ``name``." msgstr "" -"En los casos en los que sólo está disponible el manejador de la biblioteca " -"en lugar del objeto, al acceder a una función se produce un evento de " -"auditoría ``ctypes.dlsym/handle`` con los argumentos ``handle`` (el " -"manejador de la biblioteca en bruto) y ``name``." +"En los casos en los que sólo está disponible el manejador de la biblioteca en " +"lugar del objeto, al acceder a una función se produce un evento de auditoría " +"``ctypes.dlsym/handle`` con los argumentos ``handle`` (el manejador de la " +"biblioteca en bruto) y ``name``." #: ../Doc/library/ctypes.rst:1531 msgid "Foreign functions" @@ -2032,11 +2019,11 @@ msgid "" "library loader. They are instances of a private class:" msgstr "" "Como se explicó en la sección anterior, se puede acceder a las funciones " -"foráneas como atributos de las bibliotecas compartidas cargadas. Los " -"objetos de función creados de esta forma aceptan por defecto cualquier " -"número de argumentos, aceptan cualquier instancia de datos ctypes como " -"argumentos y devuelven el tipo de resultado por defecto especificado por el " -"cargador de la biblioteca. Son instancias de una clase privada:" +"foráneas como atributos de las bibliotecas compartidas cargadas. Los objetos " +"de función creados de esta forma aceptan por defecto cualquier número de " +"argumentos, aceptan cualquier instancia de datos ctypes como argumentos y " +"retornan el tipo de resultado por defecto especificado por el cargador de la " +"biblioteca. Son instancias de una clase privada:" #: ../Doc/library/ctypes.rst:1542 msgid "Base class for C callable foreign functions." @@ -2055,8 +2042,8 @@ msgid "" "This behavior can be customized by assigning to special attributes of the " "foreign function object." msgstr "" -"Este comportamiento puede personalizarse asignando a los atributos " -"especiales del objeto de la función foránea." +"Este comportamiento puede personalizarse asignando a los atributos especiales " +"del objeto de la función foránea." #: ../Doc/library/ctypes.rst:1552 msgid "" @@ -2064,7 +2051,7 @@ msgid "" "``None`` for :c:type:`void`, a function not returning anything." msgstr "" "Asigne un tipo de ctypes para especificar el tipo de resultado de la función " -"externa. Usa ``None`` para :c:type:`void`, una función que no devuelve nada." +"externa. Usa ``None`` para :c:type:`void`, una función que no retorna nada." #: ../Doc/library/ctypes.rst:1555 msgid "" @@ -2076,42 +2063,42 @@ msgid "" "callable to the :attr:`errcheck` attribute." msgstr "" "Es posible asignar un objeto Python invocable que no sea de tipo ctypes, en " -"este caso se supone que la función devuelve un C :c:type:`int`, y el " -"invocable se llamará con este entero, lo que permite un posterior " -"procesamiento o comprobación de errores. El uso de esto está obsoleto, para " -"un postprocesamiento más flexible o para la comprobación de errores utilice " -"un tipo de datos ctypes como :attr:`restype` y asigne un invocable al " -"atributo :attr:`errcheck`." +"este caso se supone que la función retorna un C :c:type:`int`, y el invocable " +"se llamará con este entero, lo que permite un posterior procesamiento o " +"comprobación de errores. El uso de esto está obsoleto, para un " +"postprocesamiento más flexible o para la comprobación de errores utilice un " +"tipo de datos ctypes como :attr:`restype` y asigne un invocable al atributo :" +"attr:`errcheck`." #: ../Doc/library/ctypes.rst:1564 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 "" -"Asigne una tupla de tipos ctypes para especificar los tipos de argumentos " -"que acepta la función. Las funciones que utilizan la convención de llamada " -"\"stdcall\" sólo pueden ser llamadas con el mismo número de argumentos que " -"la longitud de esta tupla; las funciones que utilizan la convención de " -"llamada C aceptan también argumentos adicionales no especificados." +"Asigne una tupla de tipos ctypes para especificar los tipos de argumentos que " +"acepta la función. Las funciones que utilizan la convención de llamada " +"\"stdcall\" sólo pueden ser llamadas con el mismo número de argumentos que la " +"longitud de esta tupla; las funciones que utilizan la convención de llamada C " +"aceptan también argumentos adicionales no especificados." #: ../Doc/library/ctypes.rst:1570 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 "" "Cuando se llama a una función foránea, cada argumento real se pasa al método " -"de la clase :meth:`from_param` de los elementos de la tupla :attr:" -"`argtypes`, este método permite adaptar el argumento real a un objeto que la " -"función externa acepta. Por ejemplo, un elemento :class:`c_char_p` de la " -"tupla :attr:`argtypes` convertirá una cadena pasada como argumento en un " -"objeto de bytes utilizando reglas de conversión ctypes." +"de la clase :meth:`from_param` de los elementos de la tupla :attr:`argtypes`, " +"este método permite adaptar el argumento real a un objeto que la función " +"externa acepta. Por ejemplo, un elemento :class:`c_char_p` de la tupla :attr:" +"`argtypes` convertirá una cadena pasada como argumento en un objeto de bytes " +"utilizando reglas de conversión ctypes." #: ../Doc/library/ctypes.rst:1577 msgid "" @@ -2122,7 +2109,7 @@ msgid "" msgstr "" "Nuevo: Ahora es posible poner en argtypes elementos que no son de tipo " "ctypes, pero cada elemento debe tener un método :meth:`from_param` que " -"devuelva un valor utilizable como argumento (entero, cadena, instancia " +"retorne un valor utilizable como argumento (entero, cadena, instancia " "ctypes). Esto permite definir adaptadores que pueden adaptar objetos " "personalizados como parámetros de la función." @@ -2139,7 +2126,7 @@ msgid "" "*result* is what the foreign function returns, as specified by the :attr:" "`restype` attribute." msgstr "" -"*result* es lo que devuelve la función externa, como se especifica en el " +"*result* es lo que retorna la función externa, como se especifica en el " "atributo :attr:`restype`." #: ../Doc/library/ctypes.rst:1594 @@ -2166,7 +2153,7 @@ msgid "" "function call, but it can also check the result value and raise an exception " "if the foreign function call failed." msgstr "" -"El objeto que devuelve esta función será devuelto por la llamada de la " +"El objeto que retorna esta función será retornado por la llamada de la " "función foránea, pero también puede comprobar el valor del resultado y hacer " "una excepción si la llamada de la función foránea ha fallado." @@ -2178,7 +2165,6 @@ msgstr "" "Esta excepción se lanza cuando una llamada a una función foránea no puede " "convertir uno de los argumentos pasados." -#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.seh_exception`` with " "argument ``code``." @@ -2189,13 +2175,13 @@ msgstr "" #: ../Doc/library/ctypes.rst:1615 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, cuando una llamada a una función foránea plantea una excepción " -"de sistema (por ejemplo, debido a una violación de acceso), será capturada y " +"En Windows, cuando una llamada a una función foránea plantea una excepción de " +"sistema (por ejemplo, debido a una violación de acceso), será capturada y " "sustituida por una excepción Python adecuada. Además, un evento de auditoría " "``ctypes.seh_exception`` con el argumento ``code`` será levantado, " "permitiendo que un gancho de auditoría reemplace la excepción con la suya " @@ -2250,7 +2236,7 @@ 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 "" -"El prototipo de función devuelto crea funciones que usan la convención de " +"El prototipo de función retornado crea funciones que usan la convención de " "llamada C estándar. La función liberará el GIL durante la llamada. Si " "*use_errno* se configura a true, la copia privada de ctypes de la variable " "del sistema :data:`errno` se intercambia con el valor real :data:`errno` " @@ -2265,7 +2251,7 @@ msgid "" "the GIL during the call. *use_errno* and *use_last_error* have the same " "meaning as above." msgstr "" -"Sólo Windows: El prototipo de función devuelto crea funciones que usan la " +"Sólo Windows: El prototipo de función retornado crea funciones que usan la " "convención de llamada \"STDCALL\", excepto en Windows CE donde :func:" "`WINFUNCTYPE` es lo mismo que :func:`CFUNCTYPE`. La función lanzará el GIL " "durante la llamada. *use_errno* y *use_last_error* tienen el mismo " @@ -2273,48 +2259,48 @@ msgstr "" #: ../Doc/library/ctypes.rst:1661 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 "" -"El prototipo de función devuelto crea funciones que usan la convención de " +"El prototipo de función retornado crea funciones que usan la convención de " "llamadas de Python. La función *no* liberará el GIL durante la llamada." #: ../Doc/library/ctypes.rst:1664 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 "" -"Los prototipos de funciones creados por estas funciones de fábrica pueden " -"ser instanciados de diferentes maneras, dependiendo del tipo y el número de " -"los parámetros en la llamada:" +"Los prototipos de funciones creados por estas funciones de fábrica pueden ser " +"instanciados de diferentes maneras, dependiendo del tipo y el número de los " +"parámetros en la llamada:" #: ../Doc/library/ctypes.rst:1672 msgid "" "Returns a foreign function at the specified address which must be an integer." msgstr "" -"Devuelve una función foránea en la dirección especificada que debe ser un " +"Retorna una función foránea en la dirección especificada que debe ser un " "número entero." #: ../Doc/library/ctypes.rst:1679 msgid "" "Create a C callable function (a callback function) from a Python *callable*." msgstr "" -"Crear una función de llamada C (una función de devolución de llamada) a " -"partir de un *callable* Python." +"Crear una función de llamada C (una función de retrollamada) a partir de un " +"*callable* Python." #: ../Doc/library/ctypes.rst:1686 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 "" -"Devuelve una función foránea exportada por una biblioteca compartida. " +"Retorna una función foránea exportada por una biblioteca compartida. " "*func_spec* debe ser un 2-tupla ``(name_or_ordinal, library)``. El primer " -"elemento es el nombre de la función exportada como cadena, o el ordinal de " -"la función exportada como entero pequeño. El segundo elemento es la " -"instancia de la biblioteca compartida." +"elemento es el nombre de la función exportada como cadena, o el ordinal de la " +"función exportada como entero pequeño. El segundo elemento es la instancia " +"de la biblioteca compartida." #: ../Doc/library/ctypes.rst:1696 msgid "" @@ -2323,7 +2309,7 @@ msgid "" "is name of the COM method. *iid* is an optional pointer to the interface " "identifier which is used in extended error reporting." msgstr "" -"Devuelve una función foránea que llamará a un método COM. *vtbl_index* es el " +"Retorna una función foránea que llamará a un método COM. *vtbl_index* es el " "índice de la tabla de funciones virtuales, un pequeño entero no negativo. " "*name* es el nombre del método COM. *iid* es un puntero opcional para el " "identificador de la interfaz que se utiliza en el informe de errores " @@ -2336,16 +2322,16 @@ msgid "" "specified in the :attr:`argtypes` tuple." msgstr "" "Los métodos COM usan una convención especial de llamadas: Requieren un " -"puntero a la interfaz COM como primer argumento, además de los parámetros " -"que se especifican en la tupla :attr:`argtypes`." +"puntero a la interfaz COM como primer argumento, además de los parámetros que " +"se especifican en la tupla :attr:`argtypes`." #: ../Doc/library/ctypes.rst:1705 msgid "" "The optional *paramflags* parameter creates foreign function wrappers with " "much more functionality than the features described above." msgstr "" -"El parámetro opcional *paramflags* crea envoltorios de funciones foráneas " -"con mucha más funcionalidad que las características descritas anteriormente." +"El parámetro opcional *paramflags* crea envoltorios de funciones foráneas con " +"mucha más funcionalidad que las características descritas anteriormente." #: ../Doc/library/ctypes.rst:1708 msgid "*paramflags* must be a tuple of the same length as :attr:`argtypes`." @@ -2357,8 +2343,8 @@ msgid "" "Each item in this tuple contains further information about a parameter, it " "must be a tuple containing one, two, or three items." msgstr "" -"Cada elemento de esta tupla contiene más información sobre un parámetro, " -"debe ser una tupla que contenga uno, dos o tres elementos." +"Cada elemento de esta tupla contiene más información sobre un parámetro, debe " +"ser una tupla que contenga uno, dos o tres elementos." #: ../Doc/library/ctypes.rst:1713 msgid "" @@ -2407,9 +2393,9 @@ msgstr "El tercer elemento opcional es el valor por defecto de este parámetro." #: ../Doc/library/ctypes.rst:1730 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 "" "Este ejemplo demuestra cómo envolver la función ``MessageBoxW`` de Windows " "para que soporte los parámetros por defecto y los argumentos con nombre. La " @@ -2425,10 +2411,9 @@ msgstr "La función foránea de ``MessageBox`` puede ser llamada de esta manera: #: ../Doc/library/ctypes.rst:1755 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 "" "Un segundo ejemplo demuestra los parámetros de salida. La función " "``GetWindowRect`` de win32 retorna las dimensiones de una ventana " @@ -2442,10 +2427,10 @@ msgid "" "parameter values when there are more than one, so the GetWindowRect function " "now returns a RECT instance, when called." msgstr "" -"Las funciones con parámetros de salida devolverán automáticamente el valor " -"del parámetro de salida si hay uno solo, o una tupla que contiene los " -"valores del parámetro de salida cuando hay más de uno, por lo que la función " -"GetWindowRect devuelve ahora una instancia RECT, cuando se llama." +"Las funciones con parámetros de salida retornarán automáticamente el valor " +"del parámetro de salida si hay uno solo, o una tupla que contiene los valores " +"del parámetro de salida cuando hay más de uno, por lo que la función " +"GetWindowRect retorna ahora una instancia RECT, cuando se llama." #: ../Doc/library/ctypes.rst:1778 msgid "" @@ -2456,11 +2441,10 @@ msgid "" "call failed::" msgstr "" "Los parámetros de salida pueden combinarse con el protocolo :attr:`errcheck` " -"para hacer un mayor procesamiento de la salida y la comprobación de " -"errores. La función api de win32 ``GetWindowRect`` devuelve un ``BOOL`` " -"para señalar el éxito o el fracaso, por lo que esta función podría hacer la " -"comprobación de errores, y plantea una excepción cuando la llamada api ha " -"fallado::" +"para hacer un mayor procesamiento de la salida y la comprobación de errores. " +"La función api de win32 ``GetWindowRect`` retorna un ``BOOL`` para señalar el " +"éxito o el fracaso, por lo que esta función podría hacer la comprobación de " +"errores, y plantea una excepción cuando la llamada api ha fallado::" #: ../Doc/library/ctypes.rst:1791 msgid "" @@ -2470,11 +2454,11 @@ 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 función :attr:`errcheck` devuelve la tupla de argumentos que recibe " -"sin cambios, :mod:`ctypes` continúa el procesamiento normal que hace en los " -"parámetros de salida. Si quieres devolver una tupla de coordenadas de " -"ventana en lugar de una instancia ``RECT``, puedes recuperar los campos de " -"la función y devolverlos en su lugar, el procesamiento normal ya no tendrá " +"Si la función :attr:`errcheck` retorna la tupla de argumentos que recibe sin " +"cambios, :mod:`ctypes` continúa el procesamiento normal que hace en los " +"parámetros de salida. Si quieres retornar una tupla de coordenadas de " +"ventana en lugar de una instancia ``RECT``, puedes recuperar los campos de la " +"función y retornarlos en su lugar, el procesamiento normal ya no tendrá " "lugar::" #: ../Doc/library/ctypes.rst:1810 @@ -2486,13 +2470,13 @@ msgid "" "Returns the address of the memory buffer as integer. *obj* must be an " "instance of a ctypes type." msgstr "" -"Devuelve la dirección del buffer de memoria como un entero. *obj* debe ser " +"Retorna la dirección del buffer de memoria como un entero. *obj* debe ser " "una instancia de tipo ctypes." #: ../Doc/library/ctypes.rst:1817 msgid "" -"Raises an :ref:`auditing event ` ``ctypes.addressof`` with " -"argument ``obj``." +"Raises an :ref:`auditing event ` ``ctypes.addressof`` with argument " +"``obj``." msgstr "" "Lanza un :ref:`evento de auditoría ` ``ctypes.addressof`` con el " "argumento ``obj``." @@ -2502,8 +2486,8 @@ msgid "" "Returns the alignment requirements of a ctypes type. *obj_or_type* must be a " "ctypes type or instance." msgstr "" -"Devuelve los requerimientos de alineación de un tipo de ctypes. " -"*obj_or_type* debe ser un tipo o instancia ctypes." +"Retorna los requerimientos de alineación de un tipo de ctypes. *obj_or_type* " +"debe ser un tipo o instancia ctypes." #: ../Doc/library/ctypes.rst:1828 msgid "" @@ -2511,9 +2495,9 @@ msgid "" "ctypes type. *offset* defaults to zero, and must be an integer that will be " "added to the internal pointer value." msgstr "" -"Devuelve un puntero ligero a *obj*, que debe ser un ejemplo de un tipo de " -"ctypes. *offset* es por defecto cero, y debe ser un entero que se añadirá " -"al valor del puntero interno." +"Retorna un puntero ligero a *obj*, que debe ser un ejemplo de un tipo de " +"ctypes. *offset* es por defecto cero, y debe ser un entero que se añadirá al " +"valor del puntero interno." #: ../Doc/library/ctypes.rst:1832 msgid "``byref(obj, offset)`` corresponds to this C code::" @@ -2521,23 +2505,23 @@ msgstr "\"byref (obj, offset)\" corresponde a este código C::" #: ../Doc/library/ctypes.rst:1836 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 "" -"El objeto devuelto sólo puede ser utilizado como un parámetro de llamada de " +"El objeto retornado sólo puede ser utilizado como un parámetro de llamada de " "función foránea. Se comporta de manera similar a ``pointer(obj)``, pero la " "construcción es mucho más rápida." #: ../Doc/library/ctypes.rst:1842 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 "" -"Esta función es similar a la del operador de reparto en C. Devuelve una " -"nueva instancia de *type* que apunta al mismo bloque de memoria que *obj*. " -"*type* debe ser un tipo de puntero, y *obj* debe ser un objeto que pueda ser " +"Esta función es similar a la del operador de reparto en C. retorna una nueva " +"instancia de *type* que apunta al mismo bloque de memoria que *obj*. *type* " +"debe ser un tipo de puntero, y *obj* debe ser un objeto que pueda ser " "interpretado como un puntero." #: ../Doc/library/ctypes.rst:1850 @@ -2545,31 +2529,31 @@ msgid "" "This function creates a mutable character buffer. The returned object is a " "ctypes array of :class:`c_char`." msgstr "" -"Esta función crea un búfer de caracteres mutables. El objeto devuelto es un " +"Esta función crea un búfer de caracteres mutables. El objeto retornado es un " "arreglo de ctypes de :class:`c_char`." #: ../Doc/library/ctypes.rst:1853 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 "" "*init_or_size* debe ser un número entero que especifique el tamaño del " -"arreglo, o un objeto de bytes que se utilizará para inicializar los " -"elementos del arreglo." +"arreglo, o un objeto de bytes que se utilizará para inicializar los elementos " +"del arreglo." #: ../Doc/library/ctypes.rst:1856 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 "" "Si se especifica un objeto bytes como primer argumento, el buffer se hace un " "elemento más grande que su longitud, de modo que el último elemento del " "arreglo es un carácter de terminación NUL. Se puede pasar un entero como " -"segundo argumento que permite especificar el tamaño del arreglo si no se " -"debe utilizar la longitud de los bytes." +"segundo argumento que permite especificar el tamaño del arreglo si no se debe " +"utilizar la longitud de los bytes." #: ../Doc/library/ctypes.rst:1861 msgid "" @@ -2581,16 +2565,16 @@ msgstr "" #: ../Doc/library/ctypes.rst:1866 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 "" -"Esta función crea un búfer de caracteres unicode mutable. El objeto devuelto " +"Esta función crea un búfer de caracteres unicode mutable. El objeto retornado " "es un arreglo de ctypes de :class:`c_wchar`." #: ../Doc/library/ctypes.rst:1869 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 "" "*init_or_size* debe ser un entero que especifique el tamaño del arreglo, o " "una cadena que se utilizará para inicializar los elementos del arreglo." @@ -2598,8 +2582,8 @@ msgstr "" #: ../Doc/library/ctypes.rst:1872 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 "" @@ -2620,8 +2604,8 @@ msgstr "" #: ../Doc/library/ctypes.rst:1883 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 "" "Sólo Windows: Esta función es un gancho que permite implementar servidores " "COM en proceso con ctypes. Se llama desde la función DllCanUnloadNow que la " @@ -2641,14 +2625,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 "" -"Intenta encontrar una biblioteca y devolver un nombre. *name* es el nombre " +"Intenta encontrar una biblioteca y retornar un nombre. *name* es el nombre " "de la biblioteca sin ningún prefijo como ``lib``, sufijo como ``.so``, ``." "dylib`` o número de versión (esta es la forma usada para la opción del " -"enlazador posix :option:`!-l`). Si no se puede encontrar ninguna " -"biblioteca, devuelve ``None``." +"enlazador posix :option:`!-l`). Si no se puede encontrar ninguna biblioteca, " +"retorna ``None``." #: ../Doc/library/ctypes.rst:1909 msgid "" @@ -2656,9 +2640,9 @@ msgid "" "and by the extension modules. If the name of the library cannot be " "determined, ``None`` is returned." msgstr "" -"Sólo Windows: devuelve el nombre de archivo de la biblioteca de tiempo de " +"Sólo Windows: retorna el nombre de archivo de la biblioteca de tiempo de " "ejecución de VC usada por Python, y por los módulos de extensión. Si no se " -"puede determinar el nombre de la biblioteca, se devuelve ``None``." +"puede determinar el nombre de la biblioteca, se retorna ``None``." #: ../Doc/library/ctypes.rst:1913 msgid "" @@ -2666,9 +2650,9 @@ msgid "" "with a call to the ``free(void *)``, it is important that you use the " "function in the same library that allocated the memory." msgstr "" -"Si necesita liberar memoria, por ejemplo, asignada por un módulo de " -"extensión con una llamada al ``free(void *)``, es importante que utilice la " -"función en la misma biblioteca que asignó la memoria." +"Si necesita liberar memoria, por ejemplo, asignada por un módulo de extensión " +"con una llamada al ``free(void *)``, es importante que utilice la función en " +"la misma biblioteca que asignó la memoria." #: ../Doc/library/ctypes.rst:1920 msgid "" @@ -2676,9 +2660,9 @@ msgid "" "error code is specified, the last error code is used by calling the Windows " "api function GetLastError." msgstr "" -"Sólo Windows: Devuelve una descripción textual del código de error *code*. " -"Si no se especifica ningún código de error, se utiliza el último código de " -"error llamando a la función de api de Windows GetLastError." +"Sólo Windows: retorna una descripción textual del código de error *code*. Si " +"no se especifica ningún código de error, se utiliza el último código de error " +"llamando a la función de api de Windows GetLastError." #: ../Doc/library/ctypes.rst:1927 msgid "" @@ -2686,18 +2670,18 @@ msgid "" "thread. This function calls the Windows `GetLastError()` function directly, " "it does not return the ctypes-private copy of the error code." msgstr "" -"Sólo Windows: Devuelve el último código de error establecido por Windows en " -"el hilo de llamada. Esta función llama directamente a la función " -"`GetLastError()` de Windows, no devuelve la copia ctypes-private del código " -"de error." +"Sólo Windows: retorna el último código de error establecido por Windows en el " +"hilo de llamada. Esta función llama directamente a la función " +"`GetLastError()` de Windows, no retorna la copia ctypes-private del código de " +"error." #: ../Doc/library/ctypes.rst:1933 msgid "" "Returns the current value of the ctypes-private copy of the system :data:" "`errno` variable in the calling thread." msgstr "" -"Devuelve el valor actual de la copia ctypes-private de la variable de " -"sistema :data:`errno` en el hilo de llamada." +"Retorna el valor actual de la copia ctypes-private de la variable de sistema :" +"data:`errno` en el hilo de llamada." #: ../Doc/library/ctypes.rst:1936 msgid "" @@ -2712,7 +2696,7 @@ msgid "" "Windows only: returns the current value of the ctypes-private copy of the " "system :data:`LastError` variable in the calling thread." msgstr "" -"Sólo Windows: devuelve el valor actual de la copia ctypes-private de la " +"Sólo Windows: retorna el valor actual de la copia ctypes-private de la " "variable de sistema :data:`LastError` en el hilo de llamada." #: ../Doc/library/ctypes.rst:1943 @@ -2726,12 +2710,12 @@ msgstr "" #: ../Doc/library/ctypes.rst:1947 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 "" -"Igual que la función de la biblioteca estándar de C *memmove*: copia " -"*count* bytes de *src* a *dst*. *dst* y *src* deben ser enteros o instancias " -"ctypes que pueden ser convertidos en punteros." +"Igual que la función de la biblioteca estándar de C *memmove*: copia *count* " +"bytes de *src* a *dst*. *dst* y *src* deben ser enteros o instancias ctypes " +"que pueden ser convertidos en punteros." #: ../Doc/library/ctypes.rst:1954 msgid "" @@ -2740,9 +2724,9 @@ msgid "" "specifying an address, or a ctypes instance." msgstr "" "Igual que la función de la biblioteca estándar de C *memset* C: llena el " -"bloque de memoria en la dirección *dst* con *count* bytes de valor *c*. " -"*dst* debe ser un número entero que especifique una dirección, o una " -"instancia ctypes." +"bloque de memoria en la dirección *dst* con *count* bytes de valor *c*. *dst* " +"debe ser un número entero que especifique una dirección, o una instancia " +"ctypes." #: ../Doc/library/ctypes.rst:1961 msgid "" @@ -2750,18 +2734,18 @@ msgid "" "types are cached and reused internally, so calling this function repeatedly " "is cheap. *type* must be a ctypes type." msgstr "" -"Esta función de fábrica crea y devuelve un nuevo tipo de puntero ctypes. Los " +"Esta función de fábrica crea y retorna un nuevo tipo de puntero ctypes. Los " "tipos de puntero se almacenan en caché y se reutilizan internamente, por lo " "que llamar a esta función repetidamente es barato. *type* debe ser un tipo " "ctypes." #: ../Doc/library/ctypes.rst:1968 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 "" "Esta función crea una nueva instancia de puntero, apuntando a *obj*. El " -"objeto devuelto es del tipo ``POINTER(tipo(obj))``." +"objeto retornado es del tipo ``POINTER(tipo(obj))``." #: ../Doc/library/ctypes.rst:1971 msgid "" @@ -2780,8 +2764,8 @@ msgid "" msgstr "" "Esta función redimensiona el búfer de memoria interna de *obj*, que debe ser " "una instancia de tipo ctypes. No es posible hacer el buffer más pequeño que " -"el tamaño nativo del tipo de objetos, como lo indica ``size of " -"(type(obj))``, pero es posible agrandar el buffer." +"el tamaño nativo del tipo de objetos, como lo indica ``size of (type(obj))``, " +"pero es posible agrandar el buffer." #: ../Doc/library/ctypes.rst:1985 msgid "" @@ -2789,25 +2773,25 @@ msgid "" "variable in the calling thread to *value* and return the previous value." msgstr "" "Poner el valor actual de la copia ctypes-private de la variable del sistema :" -"data:`errno` en el hilo de llamada a *valor* y devolver el valor anterior." +"data:`errno` en el hilo de llamada a *valor* y retornar el valor anterior." #: ../Doc/library/ctypes.rst:1988 msgid "" -"Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " -"argument ``errno``." +"Raises an :ref:`auditing event ` ``ctypes.set_errno`` with argument " +"``errno``." msgstr "" "Lanza un :ref:`evento de auditoría ` ``ctypes.set_errno`` con " "argumento ``errno``." #: ../Doc/library/ctypes.rst:1993 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 "" "Sólo para Windows: pone el valor actual de la copia ctypes-private de la " "variable del sistema :data:`LastError` en el hilo de llamada a *valor* y " -"devuelve el valor anterior." +"retorna el valor anterior." #: ../Doc/library/ctypes.rst:1997 msgid "" @@ -2822,7 +2806,7 @@ msgid "" "Returns the size in bytes of a ctypes type or instance memory buffer. Does " "the same as the C ``sizeof`` operator." msgstr "" -"Devuelve el tamaño en bytes de un buffer de memoria tipo ctypes o instancia. " +"Retorna el tamaño en bytes de un buffer de memoria tipo ctypes o instancia. " "Hace lo mismo que el operador C ``sizeof``." #: ../Doc/library/ctypes.rst:2008 @@ -2831,7 +2815,7 @@ msgid "" "bytes object. If size is specified, it is used as size, otherwise the string " "is assumed to be zero-terminated." msgstr "" -"Esta función devuelve la cadena C que comienza en la dirección de memoria " +"Esta función retorna la cadena C que comienza en la dirección de memoria " "*address* como un objeto de bytes. Si se especifica el tamaño, se utiliza " "como tamaño, de lo contrario se asume que la cadena tiene un final cero." @@ -2846,14 +2830,13 @@ msgstr "" #: ../Doc/library/ctypes.rst:2017 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 "" -"Sólo para Windows: esta función es probablemente la cosa peor nombrada de " -"los ctypes. Crea una instancia de OSError. Si no se especifica el *code*, " -"se llama a \"GetLastError\" para determinar el código de error. Si no se " +"Sólo para Windows: esta función es probablemente la cosa peor nombrada de los " +"ctypes. Crea una instancia de OSError. Si no se especifica el *code*, se " +"llama a \"GetLastError\" para determinar el código de error. Si no se " "especifica *descr*, se llama a :func:`FormatError`` para obtener una " "descripción textual del error." @@ -2868,7 +2851,7 @@ msgid "" "characters of the string, otherwise the string is assumed to be zero-" "terminated." msgstr "" -"Esta función devuelve la cadena de caracteres anchos que comienza en la " +"Esta función retorna la cadena de caracteres anchos que comienza en la " "dirección de memoria *address* como una cadena. Si se especifica *size*, se " "utiliza como el número de caracteres de la cadena, de lo contrario se asume " "que la cadena tiene un final cero." @@ -2897,10 +2880,10 @@ msgstr "" "Esta clase no pública es la clase de base común de todos los tipos de datos " "de los ctypes. Entre otras cosas, todas las instancias de tipo ctypes " "contienen un bloque de memoria que contiene datos compatibles con C; la " -"dirección del bloque de memoria es devuelta por la función de ayuda :func:" -"`addressof`. Otra variable de instancia se expone como :attr:`_objetos`; " -"ésta contiene otros objetos de Python que deben mantenerse vivos en caso de " -"que el bloque de memoria contenga punteros." +"dirección del bloque de memoria es retornada por la función de ayuda :func:" +"`addressof`. Otra variable de instancia se expone como :attr:`_objetos`; ésta " +"contiene otros objetos de Python que deben mantenerse vivos en caso de que el " +"bloque de memoria contenga punteros." #: ../Doc/library/ctypes.rst:2052 msgid "" @@ -2914,11 +2897,11 @@ 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 "" -"Este método devuelve una instancia ctypes que comparte el buffer del objeto " +"Este método retorna una instancia ctypes que comparte el buffer del objeto " "*source*. El objeto *source* debe soportar la interfaz del buffer de " "escritura. El parámetro opcional *offset* especifica un offset en el buffer " "de la fuente en bytes; el valor por defecto es cero. Si el buffer de la " @@ -2936,29 +2919,29 @@ 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 "" "Este método crea una instancia ctypes, copiando el buffer del buffer de " "objetos *source* que debe ser legible. El parámetro opcional *offset* " -"especifica un offset en el buffer de origen en bytes; el valor por defecto " -"es cero. Si el buffer de fuente no es lo suficientemente grande se lanza " -"un :exc:`ValueError`." +"especifica un offset en el buffer de origen en bytes; el valor por defecto es " +"cero. Si el buffer de fuente no es lo suficientemente grande se lanza un :" +"exc:`ValueError`." #: ../Doc/library/ctypes.rst:2077 msgid "" "This method returns a ctypes type instance using the memory specified by " "*address* which must be an integer." msgstr "" -"Este método devuelve una instancia de tipo ctypes utilizando la memoria " +"Este método retorna una instancia de tipo ctypes utilizando la memoria " "especificada por *address* que debe ser un entero." msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata`` with argument " "``address``." msgstr "" -"Lanza un :ref:`evento de auditoría ` ``ctypes.cdata`` con " -"argumento ``address``." +"Lanza un :ref:`evento de auditoría ` ``ctypes.cdata`` con argumento " +"``address``." #: ../Doc/library/ctypes.rst:2082 msgid "" @@ -2975,20 +2958,20 @@ msgid "" "foreign function's :attr:`argtypes` tuple; it must return an object that can " "be used as a function call parameter." msgstr "" -"Este método adapta el *obj* a un tipo de ctypes. Se llama con el objeto " -"real usado en una llamada a una función externa cuando el tipo está presente " -"en la tupla :attr:`argtypes` de la función foránea; debe devolver un objeto " -"que pueda ser usado como parámetro de llamada a la función." +"Este método adapta el *obj* a un tipo de ctypes. Se llama con el objeto real " +"usado en una llamada a una función externa cuando el tipo está presente en la " +"tupla :attr:`argtypes` de la función foránea; debe retornar un objeto que " +"pueda ser usado como parámetro de llamada a la función." #: ../Doc/library/ctypes.rst:2093 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 "" -"Todos los tipos de datos ctypes tienen una implementación por defecto de " -"este método de clase que normalmente devuelve *obj* si es una instancia del " -"tipo. Algunos tipos aceptan también otros objetos." +"Todos los tipos de datos ctypes tienen una implementación por defecto de este " +"método de clase que normalmente retorna *obj* si es una instancia del tipo. " +"Algunos tipos aceptan también otros objetos." #: ../Doc/library/ctypes.rst:2099 msgid "" @@ -2996,9 +2979,9 @@ msgid "" "*name* is the name of the symbol that exports the data, *library* is the " "loaded shared library." msgstr "" -"Este método devuelve una instancia de tipo ctypes exportada por una " -"biblioteca compartida. *name* es el nombre del símbolo que exporta los " -"datos, *library* es la biblioteca compartida cargada." +"Este método retorna una instancia de tipo ctypes exportada por una biblioteca " +"compartida. *name* es el nombre del símbolo que exporta los datos, *library* " +"es la biblioteca compartida cargada." #: ../Doc/library/ctypes.rst:2103 msgid "Common instance variables of ctypes data types:" @@ -3012,9 +2995,9 @@ msgid "" "block." msgstr "" "A veces, las instancias de datos ctypes no poseen el bloque de memoria que " -"contienen, sino que comparten parte del bloque de memoria de un objeto " -"base. El miembro de sólo lectura :attr:`_b_base_` es el objeto raíz ctypes " -"que posee el bloque de memoria." +"contienen, sino que comparten parte del bloque de memoria de un objeto base. " +"El miembro de sólo lectura :attr:`_b_base_` es el objeto raíz ctypes que " +"posee el bloque de memoria." #: ../Doc/library/ctypes.rst:2114 msgid "" @@ -3027,9 +3010,9 @@ msgstr "" #: ../Doc/library/ctypes.rst:2119 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 "" "Este miembro es ``None`` o un diccionario que contiene objetos de Python que " @@ -3039,18 +3022,17 @@ msgstr "" #: ../Doc/library/ctypes.rst:2132 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 "" "Esta clase no pública es la clase base de todos los tipos de datos de ctypes " "fundamentales. Se menciona aquí porque contiene los atributos comunes de los " -"tipos de datos de ctypes fundamentales. :class:`_SimpleCData` es una " -"subclase de :class:`_CData`, por lo que hereda sus métodos y atributos. Los " -"tipos de datos ctypes que no son y no contienen punteros ahora pueden ser " -"archivados." +"tipos de datos de ctypes fundamentales. :class:`_SimpleCData` es una subclase " +"de :class:`_CData`, por lo que hereda sus métodos y atributos. Los tipos de " +"datos ctypes que no son y no contienen punteros ahora pueden ser archivados." #: ../Doc/library/ctypes.rst:2138 msgid "Instances have a single attribute:" @@ -3064,31 +3046,31 @@ msgid "" "bytes object or string." msgstr "" "Este atributo contiene el valor real de la instancia. Para los tipos enteros " -"y punteros, es un entero, para los tipos de caracteres, es un objeto o " -"cadena de bytes de un solo carácter, para los tipos de punteros de " -"caracteres es un objeto o cadena de bytes de Python." +"y punteros, es un entero, para los tipos de caracteres, es un objeto o cadena " +"de bytes de un solo carácter, para los tipos de punteros de caracteres es un " +"objeto o cadena de bytes de Python." #: ../Doc/library/ctypes.rst:2147 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 "" -"Cuando el atributo ``value`` se recupera de una instancia ctypes, " -"normalmente se devuelve un nuevo objeto cada vez. :mod:`ctypes` *no* " -"implementa el retorno del objeto original, siempre se construye un nuevo " -"objeto. Lo mismo ocurre con todas las demás instancias de objetos ctypes." +"Cuando el atributo ``value`` se recupera de una instancia ctypes, normalmente " +"se retorna un nuevo objeto cada vez. :mod:`ctypes` *no* implementa el retorno " +"del objeto original, siempre se construye un nuevo objeto. Lo mismo ocurre " +"con todas las demás instancias de objetos ctypes." #: ../Doc/library/ctypes.rst:2153 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 "" -"Los tipos de datos fundamentales, cuando se devuelven como resultados de " +"Los tipos de datos fundamentales, cuando se retornan como resultados de " "llamadas de funciones foráneas, o, por ejemplo, al recuperar miembros de " "campo de estructura o elementos de arreglos, se convierten de forma " "transparente a tipos nativos de Python. En otras palabras, si una función " @@ -3097,8 +3079,8 @@ msgstr "" #: ../Doc/library/ctypes.rst:2161 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 "" @@ -3129,8 +3111,8 @@ msgid "" "the length of the string must be exactly one character." msgstr "" "Representa el tipo de datos C :c:type:`char`, e interpreta el valor como un " -"solo carácter. El constructor acepta un inicializador de cadena opcional, " -"la longitud de la cadena debe ser exactamente un carácter." +"solo carácter. El constructor acepta un inicializador de cadena opcional, la " +"longitud de la cadena debe ser exactamente un carácter." #: ../Doc/library/ctypes.rst:2184 msgid "" @@ -3176,8 +3158,8 @@ msgid "" "optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias to :class:`c_long`." msgstr "" -"Representa el tipo de datos C :c:type:`signed int`. El constructor acepta " -"un inicializador entero opcional; no se hace ninguna comprobación de " +"Representa el tipo de datos C :c:type:`signed int`. El constructor acepta un " +"inicializador entero opcional; no se hace ninguna comprobación de " "desbordamiento. En plataformas donde ``sizeof(int) == sizeof(long)`` es un " "alias de :class:`c_long`." @@ -3191,24 +3173,24 @@ msgstr "" #: ../Doc/library/ctypes.rst:2223 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 "" "Representa el tipo de datos C 16-bit :c:type:`signed int`. Normalmente un " "alias para :class:`c_short`." #: ../Doc/library/ctypes.rst:2229 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 "" "Representa el tipo de datos C 32-bit :c:type:`signed int`. Normalmente un " "alias para :class:`c_int`." #: ../Doc/library/ctypes.rst:2235 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 "" "Representa el tipo de datos C 64-bit :c:type:`signed int`. Normalmente un " "alias para :class:`c_longlong`." @@ -3233,8 +3215,8 @@ msgstr "" #: ../Doc/library/ctypes.rst:2253 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 "" "Representa el tipo de datos C :c:type:`signed short`. El constructor acepta " "un inicializador entero opcional; no se hace ninguna comprobación de " @@ -3250,9 +3232,9 @@ msgstr "Representa el tipo de datos C :c:type:`ssize_t`." #: ../Doc/library/ctypes.rst:2271 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 "" "Representa el tipo de datos C :c:type:`unsigned char`, interpreta el valor " "como un entero pequeño. El constructor acepta un inicializador entero " @@ -3260,8 +3242,8 @@ msgstr "" #: ../Doc/library/ctypes.rst:2278 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 "" "Representa el tipo de datos C :c:type:`unsigned int`. El constructor acepta " @@ -3306,8 +3288,8 @@ msgid "" "Represents the C :c:type:`unsigned long` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -"Representa el tipo de datos C :c:type:`unsigned long`. El constructor " -"acepta un inicializador entero opcional; no se hace ninguna comprobación de " +"Representa el tipo de datos C :c:type:`unsigned long`. El constructor acepta " +"un inicializador entero opcional; no se hace ninguna comprobación de " "desbordamiento." #: ../Doc/library/ctypes.rst:2315 @@ -3330,8 +3312,8 @@ msgstr "" #: ../Doc/library/ctypes.rst:2327 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 "" "Representa el tipo C :c:type:`void *`. El valor se representa como un " "entero. El constructor acepta un inicializador entero opcional." @@ -3369,8 +3351,8 @@ msgstr "" #: ../Doc/library/ctypes.rst:2354 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 "" "Sólo Windows: Representa un valor :c:type:`HRESULT` , que contiene " "información de éxito o error para una llamada de función o método." @@ -3390,10 +3372,10 @@ msgid "" "`DWORD`. Some useful structures like :c:type:`MSG` or :c:type:`RECT` are " "also defined." msgstr "" -"El módulo :mod:`ctypes.wintypes` proporciona otros tipos de datos " -"específicos de Windows, por ejemplo :c:type:`HWND`, :c:type:`WPARAM`, o :c:" -"type:`DWORD`. Algunas estructuras útiles como :c:type:`MSG` o :c:type:" -"`RECT` también están definidas." +"El módulo :mod:`ctypes.wintypes` proporciona otros tipos de datos específicos " +"de Windows, por ejemplo :c:type:`HWND`, :c:type:`WPARAM`, o :c:type:`DWORD`. " +"Algunas estructuras útiles como :c:type:`MSG` o :c:type:`RECT` también están " +"definidas." #: ../Doc/library/ctypes.rst:2371 msgid "Structured data types" @@ -3432,10 +3414,10 @@ msgid "" "`ctypes` will create :term:`descriptor`\\s which allow reading and writing " "the fields by direct attribute accesses. These are the" msgstr "" -"La estructura concreta y los tipos de unión deben crearse subclasificando " -"uno de estos tipos, y al menos definir una variable de clase :attr:" -"`_fields_`. :mod:`ctypes` creará :term:`descriptor`\\s que permitan leer y " -"escribir los campos por accesos directos de atributos. Estos son los" +"La estructura concreta y los tipos de unión deben crearse subclasificando uno " +"de estos tipos, y al menos definir una variable de clase :attr:`_fields_`. :" +"mod:`ctypes` creará :term:`descriptor`\\s que permitan leer y escribir los " +"campos por accesos directos de atributos. Estos son los" #: ../Doc/library/ctypes.rst:2404 msgid "" @@ -3462,9 +3444,9 @@ msgid "" "Field names must be unique within one structure or union. This is not " "checked, only one field can be accessed when names are repeated." msgstr "" -"Los nombres de los campos deben ser únicos dentro de una estructura o " -"unión. Esto no se comprueba, sólo se puede acceder a un campo cuando los " -"nombres se repiten." +"Los nombres de los campos deben ser únicos dentro de una estructura o unión. " +"Esto no se comprueba, sólo se puede acceder a un campo cuando los nombres se " +"repiten." #: ../Doc/library/ctypes.rst:2415 msgid "" @@ -3478,13 +3460,13 @@ msgstr "" #: ../Doc/library/ctypes.rst:2425 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 "" -"Sin embargo, la variable de clase :attr:`_fields_` debe ser definida antes " -"de que el tipo sea usado por primera vez (se crea una instancia, se llama a :" +"Sin embargo, la variable de clase :attr:`_fields_` debe ser definida antes de " +"que el tipo sea usado por primera vez (se crea una instancia, se llama a :" "func:`sizeof`, y así sucesivamente). Las asignaciones posteriores a la " "variable de clase :attr:`_fields_` lanzarán un AttributeError." @@ -3510,12 +3492,12 @@ msgstr "" #: ../Doc/library/ctypes.rst:2444 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 "" "Una secuencia opcional que enumera los nombres de los campos sin nombre " -"(anónimos). :attr:`_anonymous_` debe estar ya definida cuando se asigna :" -"attr:`_fields_`, de lo contrario no tendrá ningún efecto." +"(anónimos). :attr:`_anonymous_` debe estar ya definida cuando se asigna :attr:" +"`_fields_`, de lo contrario no tendrá ningún efecto." #: ../Doc/library/ctypes.rst:2448 msgid "" @@ -3537,8 +3519,8 @@ msgstr "Aquí hay un tipo de ejemplo (Windows)::" 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 "" @@ -3572,11 +3554,11 @@ msgid "" msgstr "" "Los constructores de estructuras y uniones aceptan tanto argumentos " "posicionales como de palabras clave. Los argumentos posicionales se usan " -"para inicializar los campos de los miembros en el mismo orden en que " -"aparecen en :attr:`_fields_`. Los argumentos de palabras clave en el " -"constructor se interpretan como asignaciones de atributos, por lo que " -"inicializarán :attr:`_fields_` con el mismo nombre, o crearán nuevos " -"atributos para nombres no presentes en :attr:`_fields_`." +"para inicializar los campos de los miembros en el mismo orden en que aparecen " +"en :attr:`_fields_`. Los argumentos de palabras clave en el constructor se " +"interpretan como asignaciones de atributos, por lo que inicializarán :attr:" +"`_fields_` con el mismo nombre, o crearán nuevos atributos para nombres no " +"presentes en :attr:`_fields_`." #: ../Doc/library/ctypes.rst:2494 msgid "Arrays and pointers" @@ -3588,18 +3570,18 @@ msgstr "Clase base abstracta para los arreglos." #: ../Doc/library/ctypes.rst:2500 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 "" "La forma recomendada de crear tipos de arreglos concretos es multiplicando " "cualquier tipo de datos :mod:`ctypes` con un número entero positivo. " "Alternativamente, puedes subclasificar este tipo y definir las variables de " -"clase :attr:`_length_` y :attr:`_type_`. Los elementos del arreglo pueden " -"ser leídos y escritos usando subíndices estándar y accesos slice; para las " +"clase :attr:`_length_` y :attr:`_type_`. Los elementos del arreglo pueden ser " +"leídos y escritos usando subíndices estándar y accesos slice; para las " "lecturas slice, el objeto resultante *no es* en sí mismo un :class:`Array`." #: ../Doc/library/ctypes.rst:2510 @@ -3608,9 +3590,9 @@ msgid "" "range subscripts result in an :exc:`IndexError`. Will be returned by :func:" "`len`." msgstr "" -"Un número entero positivo que especifica el número de elementos del " -"conjunto. Los subíndices fuera de rango dan como resultado un :exc:" -"`IndexError`. Será devuelto por :func:`len`." +"Un número entero positivo que especifica el número de elementos del conjunto. " +"Los subíndices fuera de rango dan como resultado un :exc:`IndexError`. Será " +"retornado por :func:`len`." #: ../Doc/library/ctypes.rst:2517 msgid "Specifies the type of each element in the array." @@ -3644,12 +3626,12 @@ msgid "" "the memory *before* the pointer (as in C), and out-of-range subscripts will " "probably crash with an access violation (if you're lucky)." msgstr "" -"Si un puntero apunta a un arreglo, sus elementos pueden ser leídos y " -"escritos usando accesos de subíndices y cortes estándar. Los objetos " -"punteros no tienen tamaño, así que :func:`len` lanzará un :exc:`TypeError`. " -"Los subíndices negativos se leerán de la memoria *antes* que el puntero " -"(como en C), y los subíndices fuera de rango probablemente se bloqueen con " -"una violación de acceso (si tienes suerte)." +"Si un puntero apunta a un arreglo, sus elementos pueden ser leídos y escritos " +"usando accesos de subíndices y cortes estándar. Los objetos punteros no " +"tienen tamaño, así que :func:`len` lanzará un :exc:`TypeError`. Los " +"subíndices negativos se leerán de la memoria *antes* que el puntero (como en " +"C), y los subíndices fuera de rango probablemente se bloqueen con una " +"violación de acceso (si tienes suerte)." #: ../Doc/library/ctypes.rst:2542 msgid "Specifies the type pointed to." @@ -3660,5 +3642,5 @@ msgid "" "Returns the object to which to pointer points. Assigning to this attribute " "changes the pointer to point to the assigned object." msgstr "" -"Devuelve el objeto al que apunta. Asignar a este atributo cambia el puntero " +"Retorna el objeto al que apunta. Asignar a este atributo cambia el puntero " "para que apunte al objeto asignado." From d72ed9a1233cd96b1c68a16ae783a67a7d0c7e24 Mon Sep 17 00:00:00 2001 From: Cristian Maureira-Fredes Date: Sat, 22 Aug 2020 15:53:04 +0200 Subject: [PATCH 32/34] Arreglando formato de library/ctypes --- library/ctypes.po | 1268 +++++++++++++++++++++++---------------------- 1 file changed, 640 insertions(+), 628 deletions(-) diff --git a/library/ctypes.po b/library/ctypes.po index e8c9e56cd9..73c1c6c593 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -11,7 +11,7 @@ msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-05-05 12:54+0200\n" -"PO-Revision-Date: 2020-08-22 12:52+0200\n" +"PO-Revision-Date: 2020-08-22 12:54+0200\n" "Language-Team: python-doc-es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" @@ -31,9 +31,9 @@ msgid "" "compatible data types, and allows calling functions in DLLs or shared " "libraries. It can be used to wrap these libraries in pure Python." msgstr "" -":mod:`ctypes` es una biblioteca de funciones foráneas para Python. " +":mod:`ctypes` es una biblioteca de funciones foráneas para Python. " "Proporciona tipos de datos compatibles con C y permite llamar a funciones en " -"archivos DLL o bibliotecas compartidas. Se puede utilizar para envolver " +"archivos DLL o bibliotecas compartidas. Se puede utilizar para envolver " "estas bibliotecas en Python puro." #: ../Doc/library/ctypes.rst:19 @@ -47,7 +47,7 @@ msgid "" "Windows, or Mac OS X, they contain doctest directives in comments." msgstr "" "Nota: Los ejemplos de código de este tutorial utilizan :mod:`doctest` para " -"asegurarse de que realmente funcionan. Dado que algunos ejemplos de código " +"asegurarse de que realmente funcionan. Dado que algunos ejemplos de código " "se comportan de manera diferente en Linux, Windows o Mac OS X, contienen " "directivas de prueba en los comentarios." @@ -55,11 +55,11 @@ 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 "" "Nota: Algunos ejemplos de código hacen referencia al tipo ctypes :class:" -"`c_int`. En las plataformas donde ``sizeof(long) == sizeof(int)`` es un " +"`c_int`. En las plataformas donde ``sizeof(long) == sizeof(int)`` es un " "alias de :class:`c_long`. Por lo tanto, no debe confundirse si :class:" "`c_long` se imprime si espera :class:`c_int` --- son en realidad del mismo " "tipo." @@ -86,14 +86,14 @@ msgid "" "error code is used to automatically raise an :class:`OSError` exception when " "the function call fails." msgstr "" -"Las bibliotecas se cargan accediendo a ellas como atributos de estos objetos. " -"*cdll* carga bibliotecas que exportan funciones utilizando la convención de " -"llamada estándar ``cdecl``, mientras que las bibliotecas *windll* llaman a " -"funciones mediante la convención de llamada ``stdcall``. *oledll* también " -"utiliza la convención de llamada ``stdcall`` y asume que las funciones " -"retornan un código de error Windows :c:type:`HRESULT`. El código de error se " -"utiliza para generar automáticamente una excepción :class:`OSError` cuando se " -"produce un error en la llamada a la función." +"Las bibliotecas se cargan accediendo a ellas como atributos de estos " +"objetos. *cdll* carga bibliotecas que exportan funciones utilizando la " +"convención de llamada estándar ``cdecl``, mientras que las bibliotecas " +"*windll* llaman a funciones mediante la convención de llamada ``stdcall``. " +"*oledll* también utiliza la convención de llamada ``stdcall`` y asume que " +"las funciones retornan un código de error Windows :c:type:`HRESULT`. El " +"código de error se utiliza para generar automáticamente una excepción :class:" +"`OSError` cuando se produce un error en la llamada a la función." #: ../Doc/library/ctypes.rst:46 msgid "" @@ -105,12 +105,12 @@ msgstr "" #: ../Doc/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 "" -"Estos son algunos ejemplos para Windows. Tener en cuenta que ''msvcrt'' es la " -"biblioteca estándar de MS C que contiene la mayoría de las funciones C " +"Estos son algunos ejemplos para Windows. Tener en cuenta que ''msvcrt'' es " +"la biblioteca estándar de MS C que contiene la mayoría de las funciones C " "estándar y utiliza la convención de llamada cdecl::" #: ../Doc/library/ctypes.rst:63 @@ -119,10 +119,10 @@ msgstr "Windows agrega automáticamente la extensión común ``.dll``." #: ../Doc/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 "" "Acceder a la biblioteca estándar de C a través de ``cdll.msvcrt`` utilizará " "una versión obsoleta de la biblioteca que puede ser incompatible con la " @@ -131,10 +131,10 @@ msgstr "" #: ../Doc/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 "" "En Linux, se requiere especificar el nombre de archivo *incluyendo* la " @@ -161,9 +161,9 @@ msgid "" "following C prototype, and a macro is used to expose one of them as " "``GetModuleHandle`` depending on whether UNICODE is defined or not::" msgstr "" -"Nótese que las dlls del sistema win32 como ``kernel32`` y ``user32`` a menudo " -"exportan versiones ANSI y UNICODE de una función. La versión UNICODE se " -"exporta con una ``W`` añadida al nombre, mientras que la versión ANSI se " +"Nótese que las dlls del sistema win32 como ``kernel32`` y ``user32`` a " +"menudo exportan versiones ANSI y UNICODE de una función. La versión UNICODE " +"se exporta con una ``W`` añadida al nombre, mientras que la versión ANSI se " "exporta con una ``A`` añadida al nombre. La función ``GetModuleHandle`` de " "win32, que retorna un *manejador de módulo* para un nombre de módulo dado, " "tiene el siguiente prototipo de C, y se usa una macro para exponer uno de " @@ -187,13 +187,14 @@ msgid "" "`getattr` to retrieve the function::" msgstr "" "A veces, las dlls exportan funciones con nombres que no son identificadores " -"válidos de Python, como ``”??2@YAPAXI@Z”``. En este caso tienes que usar :" +"válidos de Python, como ``\"??2@YAPAXI@Z\"``. En este caso tienes que usar :" "func:`getattr` para recuperar la función::" #: ../Doc/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 "" "En Windows, algunas dlls exportan funciones no por nombre sino por ordinal. " "Se pueden acceder a estas funciones indexando el objeto dll con el número " @@ -217,8 +218,8 @@ msgstr "" #: ../Doc/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 "" "Este ejemplo llama a ambas funciones con un puntero ``NULL`` (``None`` debe " "ser usado como el puntero ``NULL``)::" @@ -228,22 +229,22 @@ msgid "" ":exc:`ValueError` is raised when you call an ``stdcall`` function with the " "``cdecl`` calling convention, or vice versa::" msgstr "" -":exc:`ValueError` es lanzado cuando se llama a una función ``stdcall`` con la " -"convención de llamada ``cdecl``, o viceversa::" +":exc:`ValueError` es lanzado cuando se llama a una función ``stdcall`` con " +"la convención de llamada ``cdecl``, o viceversa::" #: ../Doc/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 "" "Para saber la convención de llamada correcta, hay que mirar en el archivo de " "encabezado C o en la documentación de la función que se quiere llamar." #: ../Doc/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` utiliza la gestión de excepciones estructurada de " "win32 para evitar que se produzcan fallos de protección general cuando se " @@ -257,7 +258,7 @@ msgid "" "library calls)." msgstr "" "Sin embargo, hay suficientes maneras de bloquear Python con :mod:`ctypes`, " -"así que debes tener cuidado de todos modos. El módulo :mod:`faulthandler` " +"así que debes tener cuidado de todos modos. El módulo :mod:`faulthandler` " "puede ser útil para depurar bloqueos (por ejemplo, provenientes de fallos de " "segmentación producidos por llamadas erróneas a la biblioteca C)." @@ -268,14 +269,14 @@ 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 "" "Los objetos ``None``, enteros, bytes y cadenas (unicode) son los únicos " "objetos nativos de Python que pueden ser usados directamente como parámetros " "en estas llamadas a funciones. ``None`` se pasa como puntero de C ``NULL``, " "los objetos bytes y las cadenas se pasan como puntero al bloque de memoria " -"que contiene sus datos (:c:type:`char *` o :c:type:`wchar_t *`). Los enteros " +"que contiene sus datos (:c:type:`char *` o :c:type:`wchar_t *`). Los enteros " "de Python se pasan como por defecto en la plataforma como tipo :c:type:`int` " "de C, su valor se enmascara para que encuadre en el tipo C." @@ -294,7 +295,8 @@ msgstr "Tipos de datos fundamentales" #: ../Doc/library/ctypes.rst:213 msgid ":mod:`ctypes` defines a number of primitive C compatible data types:" msgstr "" -":mod:`ctypes` define un número de tipos de datos primitivos compatibles con C:" +":mod:`ctypes` define un número de tipos de datos primitivos compatibles con " +"C:" #: ../Doc/library/ctypes.rst:216 msgid "ctypes type" @@ -553,7 +555,7 @@ msgstr "" "Sin embargo, debe tener cuidado de no pasarlos a funciones que esperan " "punteros a la memoria mutable. Si necesitas bloques de memoria mutables, " "ctypes tiene una función :func:`create_string_buffer` que los crea de varias " -"maneras. El contenido actual del bloque de memoria puede ser accedido (o " +"maneras. El contenido actual del bloque de memoria puede ser accedido (o " "cambiado) con la propiedad ``raw``; si quieres acceder a él como cadena " "terminada NUL, usa la propiedad ``value``::" @@ -561,13 +563,13 @@ msgstr "" 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 función :func:`create_string_buffer` reemplaza a la función :func:" "`c_buffer` (que todavía está disponible como un alias), así como a la " -"función :func:`c_string` de versiones anteriores de ctypes. Para crear un " +"función :func:`c_string` de versiones anteriores de ctypes. Para crear un " "bloque de memoria mutable que contenga caracteres unicode del tipo C :c:type:" "`wchar_t` utilice la función :func:`create_unicode_buffer`." @@ -592,8 +594,9 @@ msgid "" "so that they can be converted to the required C data type::" msgstr "" "Como se ha mencionado antes, todos los tipos de Python, excepto los enteros, " -"cadenas y objetos bytes, tienen que ser envueltos en su correspondiente tipo :" -"mod:`ctypes`, para que puedan ser convertidos al tipo de datos C requerido::" +"cadenas y objetos bytes, tienen que ser envueltos en su correspondiente " +"tipo :mod:`ctypes`, para que puedan ser convertidos al tipo de datos C " +"requerido::" #: ../Doc/library/ctypes.rst:378 msgid "Calling functions with your own custom data types" @@ -606,11 +609,11 @@ msgid "" "an :attr:`_as_parameter_` attribute and uses this as the function argument. " "Of course, it must be one of integer, string, or bytes::" msgstr "" -"También puedes personalizar la conversión de argumentos de :mod:`ctypes` para " -"permitir que las instancias de tus propias clases se usen como argumentos de " -"función. :mod:`ctypes` busca un atributo :attr:`_como_parámetro_` y lo usa " -"como argumento de función. Por supuesto, debe ser uno de entero, cadena o " -"bytes::" +"También puedes personalizar la conversión de argumentos de :mod:`ctypes` " +"para permitir que las instancias de tus propias clases se usen como " +"argumentos de función. :mod:`ctypes` busca un atributo :attr:" +"`_as_parameter_` y lo usa como argumento de función. Por supuesto, debe ser " +"uno de entero, cadena o bytes::" #: ../Doc/library/ctypes.rst:395 msgid "" @@ -663,23 +666,23 @@ 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 "" "Si has definido tus propias clases las cuales pasas a las llamadas a " "funciones, tienes que implementar un método de clase :meth:`from_param` para " "que puedan ser usadas en la secuencia :attr:`argtypes`. El método de clase :" "meth:`from_param` recibe el objeto Python que se le pasa a la llamada a " "función, debería hacer una comprobación de tipo o lo que sea necesario para " -"asegurarse de que este objeto es aceptable, y luego retornar el objeto en sí, " -"su atributo :attr:`_as_parameter_`, o lo que se quiera pasar como argumento " -"de la función C en este caso. De nuevo, el resultado debe ser un entero, una " -"cadena, unos bytes, una instancia :mod:`ctypes`, o un objeto con el atributo :" -"attr:`__as_parameter_`." +"asegurarse de que este objeto es aceptable, y luego retornar el objeto en " +"sí, su atributo :attr:`_as_parameter_`, o lo que se quiera pasar como " +"argumento de la función C en este caso. De nuevo, el resultado debe ser un " +"entero, una cadena, unos bytes, una instancia :mod:`ctypes`, o un objeto con " +"el atributo :attr:`_as_parameter_`." #: ../Doc/library/ctypes.rst:445 msgid "Return types" @@ -688,10 +691,10 @@ msgstr "Tipos de retorno" #: ../Doc/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 "" -"Por defecto, se supone que las funciones retornan el tipo C :c:type:`int`. " +"Por defecto, se supone que las funciones retornan el tipo C :c:type:`int`. " "Se pueden especificar otros tipos de retorno estableciendo el atributo :attr:" "`restype` del objeto de la función." @@ -700,43 +703,43 @@ msgid "" "Here is a more advanced example, it uses the ``strchr`` function, which " "expects a string pointer and a char, and returns a pointer to a string::" msgstr "" -"Aquí hay un ejemplo más avanzado, utiliza la función``strchr``, que espera un " -"puntero de cadena y un carácter, y retorna un puntero a una cadena::" +"Aquí hay un ejemplo más avanzado, utiliza la función``strchr``, que espera " +"un puntero de cadena y un carácter, y retorna un puntero a una cadena::" #: ../Doc/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 "" -"Si quieres evitar las llamadas ``ord(\"x\")`` de arriba, puedes establecer el " -"atributo :attr:`argtypes`, y el segundo argumento se convertirá de un objeto " -"de un solo carácter de bytes de Python a un char::" +"Si quieres evitar las llamadas ``ord(\"x\")`` de arriba, puedes establecer " +"el atributo :attr:`argtypes`, y el segundo argumento se convertirá de un " +"objeto de un solo carácter de bytes de Python a un char::" #: ../Doc/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::" msgstr "" "También puedes usar un objeto Python invocable (una función o una clase, por " "ejemplo) como el atributo :attr:`restype`, si la función foránea retorna un " -"número entero. El objeto invocable será llamado con el *entero* que la " +"número entero. El objeto invocable será llamado con el *entero* que la " "función C retorna, y el resultado de esta llamada será utilizado como " "resultado de la llamada a la función. Esto es útil para comprobar si hay " "valores de retorno de error y plantear automáticamente una excepción::" #: ../Doc/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\" es una función que llamará a la api Windows \"FormatMessage\" " +"``WinError`` es una función que llamará a la api Windows ``FormatMessage`` " "para obtener la representación de la cadena de un código de error, y " "retornará una excepción. ``WinError`` toma un parámetro de código de error " "opcional, si no se usa ninguno, llama a :func:`GetLastError`` para " @@ -747,9 +750,9 @@ msgid "" "Please note that a much more powerful error checking mechanism is available " "through the :attr:`errcheck` attribute; see the reference manual for details." msgstr "" -"Tenga en cuenta que un mecanismo de comprobación de errores mucho más potente " -"está disponible a través del atributo :attr:`errcheck`; consulte el manual de " -"referencia para obtener más detalles." +"Tenga en cuenta que un mecanismo de comprobación de errores mucho más " +"potente está disponible a través del atributo :attr:`errcheck`; consulte el " +"manual de referencia para obtener más detalles." #: ../Doc/library/ctypes.rst:517 msgid "Passing pointers (or: passing parameters by reference)" @@ -772,14 +775,14 @@ 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` exporta la función :func:`byref` que se utiliza para pasar " -"parámetros por referencia. El mismo efecto se puede conseguir con la " -"función :func:`pointer`, aunque :func:`pointer` hace mucho más trabajo ya que " -"construye un objeto puntero real, por lo que es más rápido usar :func:`byref` " -"si no se necesita el objeto puntero en el propio Python::" +"parámetros por referencia. El mismo efecto se puede conseguir con la " +"función :func:`pointer`, aunque :func:`pointer` hace mucho más trabajo ya " +"que construye un objeto puntero real, por lo que es más rápido usar :func:" +"`byref` si no se necesita el objeto puntero en el propio Python::" #: ../Doc/library/ctypes.rst:545 msgid "Structures and unions" @@ -792,15 +795,16 @@ msgid "" "subclass must define a :attr:`_fields_` attribute. :attr:`_fields_` must be " "a list of *2-tuples*, containing a *field name* and a *field type*." msgstr "" -"Las estructuras y uniones deben derivar de las clases base :class:`Structure` " -"y :class:`Union` que se definen en el módulo :mod:`ctypes`. Cada subclase " -"debe definir un atributo :attr:`_fields_`. :attr:`_fields_` debe ser una " -"lista de *2-tuplas*, que contenga un *nombre de campo* y un *tipo de campo*." +"Las estructuras y uniones deben derivar de las clases base :class:" +"`Structure` y :class:`Union` que se definen en el módulo :mod:`ctypes`. Cada " +"subclase debe definir un atributo :attr:`_fields_`. :attr:`_fields_` debe " +"ser una lista de *2-tuplas*, que contenga un *nombre de campo* y un *tipo de " +"campo*." #: ../Doc/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 "" "El tipo de campo debe ser un tipo :mod:`ctypes` como :class:`c_int`, o " "cualquier otro tipo :mod:`ctypes` derivado: estructura, unión, matriz, " @@ -821,7 +825,7 @@ msgid "" "You can, however, build much more complicated structures. A structure can " "itself contain other structures by using a structure as a field type." msgstr "" -"Sin embargo, se pueden construir estructuras mucho más complicadas. Una " +"Sin embargo, se pueden construir estructuras mucho más complicadas. Una " "estructura puede contener por sí misma otras estructuras usando una " "estructura como tipo de campo." @@ -830,12 +834,13 @@ msgid "" "Here is a RECT structure which contains two POINTs named *upperleft* and " "*lowerright*::" msgstr "" -"Aquí hay una estructura RECT que contiene dos POINTs llamados *superior " -"izquierda* y *bajo derecha*::" +"Aquí hay una estructura RECT que contiene dos POINTs llamados *upperleft* " +"(superior izquierda)y *lowerright* (abajo a la derecha)::" #: ../Doc/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 "" "Las estructuras anidadas también pueden ser inicializadas en el constructor " "de varias maneras::" @@ -845,19 +850,19 @@ msgid "" "Field :term:`descriptor`\\s can be retrieved from the *class*, they are " "useful for debugging because they can provide useful information::" msgstr "" -"El campo :term:`descriptor` puede ser recuperado de la *clase*, son útiles " +"El campo :term:`descriptor` puede ser recuperado de la *class*, son útiles " "para la depuración porque pueden proporcionar información útil::" #: ../Doc/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` no soporta el paso de uniones o estructuras con campos de bits " -"a funciones por valor. Aunque esto puede funcionar en 32-bit x86, la " -"biblioteca no garantiza que funcione en el caso general. Las uniones y " +"a funciones por valor. Aunque esto puede funcionar en 32-bit x86, la " +"biblioteca no garantiza que funcione en el caso general. Las uniones y " "estructuras con campos de bits siempre deben pasarse a las funciones por " "puntero." @@ -869,9 +874,9 @@ msgstr "Alineación de estructura/unión y orden de bytes" 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 "" "Por defecto, los campos de Estructura y Unión están alineados de la misma " "manera que lo hace el compilador C. Es posible anular este comportamiento " @@ -882,17 +887,17 @@ msgstr "" #: ../Doc/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` utiliza el orden de bytes nativos para las Estructuras y " -"Uniones. Para construir estructuras con un orden de bytes no nativo, puedes " +"Uniones. Para construir estructuras con un orden de bytes no nativo, puedes " "usar una de las clases base :class:`BigEndianStructure`, :class:" "`LittleEndianStructure`, :class:`BigEndianUnion`, y :class:" -"`LittleEndianUnion`. Estas clases no pueden contener campos puntero." +"`LittleEndianUnion`. Estas clases no pueden contener campos puntero." #: ../Doc/library/ctypes.rst:635 msgid "Bit fields in structures and unions" @@ -914,7 +919,8 @@ msgstr "Arreglos" #: ../Doc/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 "" "Los arreglos son secuencias, que contienen un número fijo de instancias del " "mismo tipo." @@ -929,8 +935,8 @@ msgstr "" #: ../Doc/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 "" "Aquí hay un ejemplo de un tipo de datos algo artificial, una estructura que " "contiene 4 POINTs entre otras cosas::" @@ -941,8 +947,8 @@ msgstr "Las instancias se crean de la manera habitual, llamando a la clase::" #: ../Doc/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 "" "El código anterior imprime una serie de líneas ``0 0``, porque el contenido " "del arreglos se inicializa con ceros." @@ -981,8 +987,9 @@ msgstr "" #: ../Doc/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 "" "Asignar otra instancia :class:`c_int` al atributo de contenido del puntero " "causaría que el puntero apunte al lugar de memoria donde se almacena::" @@ -1018,17 +1025,17 @@ msgid "" "returns a new type::" msgstr "" "Entre bastidores, la función :func:`pointer` hace más que simplemente crear " -"instancias de puntero, tiene que crear primero punteros *tipos*. Esto se hace " -"con la función :func:`POINTER`, que acepta cualquier tipo de :mod:`ctypes`, y " -"retorna un nuevo tipo::" +"instancias de puntero, tiene que crear primero punteros *tipos*. Esto se " +"hace con la función :func:`POINTER`, que acepta cualquier tipo de :mod:" +"`ctypes`, y retorna un nuevo tipo::" #: ../Doc/library/ctypes.rst:780 msgid "" "Calling the pointer type without an argument creates a ``NULL`` pointer. " "``NULL`` pointers have a ``False`` boolean value::" msgstr "" -"Llamar al tipo de puntero sin un argumento crea un puntero \"NULL\". Los " -"punteros \"NULL\" tienen un valor booleano falso..:" +"Llamar al tipo de puntero sin un argumento crea un puntero ``NULL``. Los " +"punteros ``NULL`` tienen un valor booleano falso..:" #: ../Doc/library/ctypes.rst:788 msgid "" @@ -1048,18 +1055,18 @@ 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 "" -"Por lo general, los ctypes hacen un control estricto de los tipos. Esto " +"Por lo general, los ctypes hacen un control estricto de los tipos. Esto " "significa que si tienes ``POINTER(c_int)`` en la lista :attr:`argtypes` de " "una función o como el tipo de un campo miembro en una definición de " -"estructura, sólo se aceptan instancias exactamente del mismo tipo. Hay " -"algunas excepciones a esta regla, en las que ctypes acepta otros objetos. " +"estructura, sólo se aceptan instancias exactamente del mismo tipo. Hay " +"algunas excepciones a esta regla, en las que ctypes acepta otros objetos. " "Por ejemplo, se pueden pasar instancias de arreglo compatibles en lugar de " -"tipos de puntero. Así, para ``POINTER(c_int)``, ctypes acepta un arreglo de " +"tipos de puntero. Así, para ``POINTER(c_int)``, ctypes acepta un arreglo de " "*c_int*::" #: ../Doc/library/ctypes.rst:830 @@ -1071,8 +1078,8 @@ msgid "" msgstr "" "Además, si se declara explícitamente que un argumento de función es de tipo " "puntero (como ``POINTER(c_int)``) en :attr:`argtypes`, se puede pasar un " -"objeto de tipo puntero (``c_int`` en este caso) a la función. ctypes aplicará " -"la conversión :func:`byref` requerida en este caso automáticamente." +"objeto de tipo puntero (``c_int`` en este caso) a la función. ctypes " +"aplicará la conversión :func:`byref` requerida en este caso automáticamente." #: ../Doc/library/ctypes.rst:835 msgid "To set a POINTER type field to ``NULL``, you can assign ``None``::" @@ -1082,14 +1089,14 @@ msgstr "" #: ../Doc/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 "" -"A veces se tienen instancias de tipos incompatibles. En C, puedes cambiar un " +"A veces se tienen instancias de tipos incompatibles. En C, puedes cambiar un " "tipo por otro tipo. :mod:`ctypes` proporciona una función :func:`cast` qué " -"puede ser usada de la misma manera. La estructura ``Bar`` definida arriba " +"puede ser usada de la misma manera. La estructura ``Bar`` definida arriba " "acepta punteros ``POINTER(c_int)`` o arreglos :class:`c_int`` para su campo " "``values``, pero no instancias de otros tipos::" @@ -1108,17 +1115,17 @@ msgstr "" "La función :func:`cast` puede ser usada para lanzar una instancia ctypes en " "un puntero a un tipo de datos ctypes diferente. :func:`cast` toma dos " "parámetros, un objeto ctypes que es o puede ser convertido en un puntero de " -"algún tipo, y un tipo de puntero ctypes. retorna una instancia del segundo " +"algún tipo, y un tipo de puntero ctypes. retorna una instancia del segundo " "argumento, que hace referencia al mismo bloque de memoria que el primer " "argumento::" #: ../Doc/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 "" -"Así, :func:`cast` puede ser usado para asignar al campo ``values`` de ``Bar`` " -"la estructura::" +"Así, :func:`cast` puede ser usado para asignar al campo ``values`` de " +"``Bar`` la estructura::" #: ../Doc/library/ctypes.rst:880 msgid "Incomplete Types" @@ -1126,8 +1133,8 @@ msgstr "Tipos incompletos" #: ../Doc/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 "" "*Los Tipos Incompletos* son estructuras, uniones o matrices cuyos miembros " @@ -1147,14 +1154,14 @@ msgid "" "itself. In :mod:`ctypes`, we can define the ``cell`` class and set the :attr:" "`_fields_` attribute later, after the class statement::" msgstr "" -"porque la nueva ``class cell`` no está disponible en la propia declaración de " -"clase. En :mod:`ctypes`, podemos definir la clase ``cell`` y establecer el " -"atributo :attr:`_fields_` más tarde, después de la declaración de clase::" +"porque la nueva ``class cell`` no está disponible en la propia declaración " +"de clase. En :mod:`ctypes`, podemos definir la clase ``cell`` y establecer " +"el atributo :attr:`_fields_` más tarde, después de la declaración de clase::" #: ../Doc/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 "" "Vamos a intentarlo. Creamos dos instancias de ``cell``, y dejamos que se " "apunten una a la otra, y finalmente seguimos la cadena de punteros unas " @@ -1174,9 +1181,9 @@ msgstr "" #: ../Doc/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 "" "Primero, debes crear una clase para la función de retrollamada. La clase " "conoce la convención de llamada, el tipo de retorno, y el número y tipos de " @@ -1197,8 +1204,8 @@ msgstr "" #: ../Doc/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 "" "Ambas funciones de fábrica se llaman con el tipo de resultado como primer " "argumento, y las funciones de llamada de retorno con los tipos de argumentos " @@ -1220,8 +1227,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` debe ser llamada con un puntero a los datos a ordenar, el " @@ -1237,7 +1244,7 @@ msgid "" "integer. First we create the ``type`` for the callback function::" msgstr "" "Así que nuestra función de retrollamada recibe punteros a números enteros, y " -"debe retornar un número entero. Primero creamos el \"tipo\" para la función " +"debe retornar un número entero. Primero creamos el ``tipo`` para la función " "de retrollamada:" #: ../Doc/library/ctypes.rst:979 @@ -1284,18 +1291,18 @@ msgstr "" 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." -msgstr "" -"Además, nótese que sí se llama a la función de retrollamada en un hilo creado " -"fuera del control de Python (por ejemplo, por el código foráneo que llama a " -"la retrollamada), ctypes crea un nuevo hilo Python tonto en cada invocación. " -"Este comportamiento es correcto para la mayoría de los propósitos, pero " -"significa que los valores almacenados con :class:`threading.local` *no* " -"sobreviven a través de diferentes llamadas de retorno, incluso cuando esas " -"llamadas se hacen desde el mismo hilo C." +"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 "" +"Además, nótese que sí se llama a la función de retrollamada en un hilo " +"creado fuera del control de Python (por ejemplo, por el código foráneo que " +"llama a la retrollamada), ctypes crea un nuevo hilo Python tonto en cada " +"invocación. Este comportamiento es correcto para la mayoría de los " +"propósitos, pero significa que los valores almacenados con :class:`threading." +"local` *no* sobreviven a través de diferentes llamadas de retorno, incluso " +"cuando esas llamadas se hacen desde el mismo hilo C." #: ../Doc/library/ctypes.rst:1053 msgid "Accessing values exported from dlls" @@ -1316,11 +1323,11 @@ msgstr "" #: ../Doc/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` puede acceder a valores como este con los métodos de la clase :" -"meth:`in_dll` del tipo. *pythonapi* es un símbolo predefinido que da acceso " +"meth:`in_dll` del tipo. *pythonapi* es un símbolo predefinido que da acceso " "a la API de Python C::" #: ../Doc/library/ctypes.rst:1069 @@ -1335,8 +1342,8 @@ msgstr "" #: ../Doc/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 "" "Un ejemplo extendido que también demuestra el uso de punteros accediendo al " "puntero :c:data:`PyImport_FrozenModules` exportado por Python." @@ -1353,16 +1360,16 @@ msgid "" "could play tricks with this to provide a dynamically created collection of " "frozen modules." msgstr "" -"Este puntero está inicializado para apuntar a un arreglo de registros :c:type:" -"`struct _frozen``, terminada por uno cuyos miembros son todos ``NULL`` o " -"cero. Cuando se importa un módulo congelado, se busca en esta tabla. El " +"Este puntero está inicializado para apuntar a un arreglo de registros :c:" +"type:`struct _frozen``, terminada por uno cuyos miembros son todos ``NULL`` " +"o cero. Cuando se importa un módulo congelado, se busca en esta tabla. El " "código de terceros podría jugar con esto para proporcionar una colección " "creada dinámicamente de módulos congelados." #: ../Doc/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 "" "Así que manipular este puntero podría incluso resultar útil. Para restringir " "el tamaño del ejemplo, sólo mostramos cómo esta tabla puede ser leída con :" @@ -1384,7 +1391,7 @@ msgid "" "crash with an access violation or whatever, so it's better to break out of " "the loop when we hit the ``NULL`` entry::" msgstr "" -"Como \"tabla\" es un \"puntero\" al arreglo de registros “struct_frozen\", " +"Como `tabla`` es un ``puntero`` al arreglo de registros ``struct_frozen``, " "podemos iterar sobre ella, pero sólo tenemos que asegurarnos de que nuestro " "bucle termine, porque los punteros no tienen tamaño. Tarde o temprano, " "probablemente se caerá con una violación de acceso o lo que sea, así que es " @@ -1398,7 +1405,8 @@ msgid "" msgstr "" "El hecho de que la Python estándar tenga un módulo congelado y un paquete " "congelado (indicado por el miembro ``tamaño`` negativo) no se conoce bien, " -"sólo se usa para hacer pruebas. Pruébalo con ``import __hello__`` por ejemplo." +"sólo se usa para hacer pruebas. Pruébalo con ``import __hello__`` por " +"ejemplo." #: ../Doc/library/ctypes.rst:1128 msgid "Surprises" @@ -1409,8 +1417,8 @@ msgid "" "There are some edges in :mod:`ctypes` where you might expect something other " "than what actually happens." msgstr "" -"Hay algunas aristas en :mod:`ctypes` en las que podrías esperar algo distinto " -"de lo que realmente sucede." +"Hay algunas aristas en :mod:`ctypes` en las que podrías esperar algo " +"distinto de lo que realmente sucede." #: ../Doc/library/ctypes.rst:1133 msgid "Consider the following example::" @@ -1421,23 +1429,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 "" -"Hm. Ciertamente esperábamos que la última declaración imprimiera ``3 4 1 2``. " -"¿Qué ha pasado? Aquí están los pasos de la línea ``rc.a, rc.b = rc.b, rc.a`` " -"arriba::" +"Hm. Ciertamente esperábamos que la última declaración imprimiera ``3 4 1 " +"2``. ¿Qué ha pasado? Aquí están los pasos de la línea ``rc.a, rc.b = rc.b, " +"rc.a`` arriba::" #: ../Doc/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 "" -"Note que ``temp0`` y ``temp1`` son objetos que todavía usan el buffer interno " -"del objeto ``rc`` de arriba. Así que ejecutando ``rc.a = temp0`` copia el " -"contenido del buffer de ``temp0`` en el buffer de ``rc``. Esto, a su vez, " -"cambia el contenido de ``temp1``. Por lo tanto, la última asignación ``rc.b = " -"temp1``, no tiene el efecto esperado." +"Note que ``temp0`` y ``temp1`` son objetos que todavía usan el buffer " +"interno del objeto ``rc`` de arriba. Así que ejecutando ``rc.a = temp0`` " +"copia el contenido del buffer de ``temp0`` en el buffer de ``rc``. Esto, a " +"su vez, cambia el contenido de ``temp1``. Por lo tanto, la última asignación " +"``rc.b = temp1``, no tiene el efecto esperado." #: ../Doc/library/ctypes.rst:1167 msgid "" @@ -1454,8 +1462,8 @@ msgid "" "Another example that may behave differently from what one would expect is " "this::" msgstr "" -"Otro ejemplo que puede comportarse de manera diferente a lo que uno esperaría " -"es este::" +"Otro ejemplo que puede comportarse de manera diferente a lo que uno " +"esperaría es este::" #: ../Doc/library/ctypes.rst:1183 msgid "" @@ -1469,15 +1477,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 "" "¿Por qué está imprimiendo ``False``? Las instancias ctypes son objetos que " "contienen un bloque de memoria más algunos :term:`descriptor`\\s que acceden " "al contenido de la memoria. Almacenar un objeto Python en el bloque de " "memoria no almacena el objeto en sí mismo, en su lugar se almacenan los " -"``contenidos`` del objeto. ¡Acceder a los contenidos de nuevo construye un " +"``contenidos`` del objeto. ¡Acceder a los contenidos de nuevo construye un " "nuevo objeto Python cada vez!" #: ../Doc/library/ctypes.rst:1196 @@ -1494,14 +1502,14 @@ msgstr "" #: ../Doc/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 función :func:`resize` puede ser usada para redimensionar el buffer de " -"memoria de un objeto ctypes existente. La función toma el objeto como primer " -"argumento, y el tamaño solicitado en bytes como segundo argumento. El bloque " +"memoria de un objeto ctypes existente. La función toma el objeto como primer " +"argumento, y el tamaño solicitado en bytes como segundo argumento. El bloque " "de memoria no puede hacerse más pequeño que el bloque de memoria natural " "especificado por el tipo de objeto, se lanza un :exc:`ValueError` si se " "intenta::" @@ -1518,12 +1526,12 @@ msgstr "" #: ../Doc/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 "" -"Otra forma de utilizar tipos de datos de tamaño variable con :mod:`ctypes` es " -"utilizar la naturaleza dinámica de Python, y (re)definir el tipo de datos " +"Otra forma de utilizar tipos de datos de tamaño variable con :mod:`ctypes` " +"es utilizar la naturaleza dinámica de Python, y (re)definir el tipo de datos " "después de que se conozca el tamaño requerido, caso por caso." #: ../Doc/library/ctypes.rst:1240 @@ -1547,9 +1555,9 @@ 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 "" "El propósito de la función :func:`find_library` es localizar una biblioteca " "de forma similar a lo que hace el compilador o el cargador en tiempo de " @@ -1560,8 +1568,8 @@ msgstr "" #: ../Doc/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 "" "El módulo :mod:`ctypes.util` proporciona una función que puede ayudar a " "determinar la biblioteca a cargar." @@ -1570,13 +1578,13 @@ 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 "" -"Intenta encontrar una biblioteca y retornar un nombre. *name* es el nombre " +"Intenta encontrar una biblioteca y retornar un nombre. *name* es el nombre " "de la biblioteca sin ningún prefijo como *lib*, sufijo como ``.so``, ``." "dylib`` o número de versión (esta es la forma usada para la opción del " -"enlazador posix :option:`!-l`). Si no se puede encontrar ninguna biblioteca, " +"enlazador posix :option:`!-l`). Si no se puede encontrar ninguna biblioteca, " "retorna ``None``." #: ../Doc/library/ctypes.rst:1270 ../Doc/library/ctypes.rst:1903 @@ -1596,7 +1604,8 @@ msgstr "" #: ../Doc/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 "" "En Linux, el valor de la variable de entorno ``LD_LIBRARY_PATH`` se utiliza " "cuando se buscan bibliotecas, si una biblioteca no puede ser encontrada por " @@ -1621,16 +1630,16 @@ msgid "" "returns the full pathname, but since there is no predefined naming scheme a " "call like ``find_library(\"c\")`` will fail and return ``None``." msgstr "" -"En Windows, :func:`find_library`` busca a lo largo de la ruta de búsqueda del " -"sistema, y retorna la ruta completa, pero como no hay un esquema de nombres " -"predefinido, una llamada como ``find_library(\"c\")`` fallará y retornará " -"``None``." +"En Windows, :func:`find_library`` busca a lo largo de la ruta de búsqueda " +"del sistema, y retorna la ruta completa, pero como no hay un esquema de " +"nombres predefinido, una llamada como ``find_library(\"c\")`` fallará y " +"retornará ``None``." #: ../Doc/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 envolvemos una biblioteca compartida con :mod:`ctypes`, puede ser mejor " @@ -1644,17 +1653,17 @@ msgstr "Cargando bibliotecas compartidas" #: ../Doc/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 "" "Hay varias maneras de cargar las bibliotecas compartidas en el proceso " -"Python. Una forma es instanciar una de las siguientes clases:" +"Python. Una forma es instanciar una de las siguientes clases:" #: ../Doc/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 "" "Las instancias de esta clase representan bibliotecas compartidas cargadas. " "Las funciones de estas bibliotecas usan la convención estándar de llamada C, " @@ -1674,7 +1683,7 @@ msgstr "" "de llamada ``stdcall``, y se asume que retornan el código específico de " "windows :class:`HRESULT``. Los valores :class:`HRESULT`` contienen " "información que especifica si la llamada a la función falló o tuvo éxito, " -"junto con un código de error adicional. Si el valor de retorno señala un " +"junto con un código de error adicional. Si el valor de retorno señala un " "fracaso, se eleva automáticamente un :class:`OSError``." #: ../Doc/library/ctypes.rst:1339 @@ -1712,9 +1721,9 @@ msgstr "" #: ../Doc/library/ctypes.rst:1359 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 "" "Las instancias de esta clase se comportan como instancias :class:`CDLL` , " "excepto que el GIL de Python es *no* liberado durante la llamada a la " @@ -1731,11 +1740,11 @@ msgstr "" #: ../Doc/library/ctypes.rst:1366 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." +"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 "" "Todas estas clases pueden ser instanciadas llamándolas con al menos un " "argumento, la ruta de la biblioteca compartida. Si tienes un manejador " @@ -1748,21 +1757,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 "" "El parámetro *mode* puede utilizarse para especificar cómo se carga la " -"biblioteca. Para más detalles, consulte la página :manpage:`dlopen(3)` " -"manpage. En Windows, *mode* es ignorado. En los sistemas posix, RTLD_NOW " +"biblioteca. Para más detalles, consulte la página :manpage:`dlopen(3)` " +"manpage. En Windows, *mode* es ignorado. En los sistemas posix, RTLD_NOW " "siempre se agrega, y no es configurable." #: ../Doc/library/ctypes.rst:1378 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 "" "El parámetro *use_errno*, cuando se establece en true, habilita un mecanismo " "ctypes que permite acceder al número de error del sistema :data:`errno` de " @@ -1774,9 +1784,9 @@ msgstr "" #: ../Doc/library/ctypes.rst:1385 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 función :func:`ctypes.get_errno` retorna el valor de la copia privada de " "ctypes, y la función :func:`ctypes.set_errno` cambia la copia privada de " @@ -1786,30 +1796,31 @@ 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 "" -"El parámetro *use_last_error*, cuando se establece en true, habilita el mismo " -"mecanismo para el código de error de Windows que es administrado por las " -"funciones de la API de Windows :func:`GetLastError` y :func:`SetLastError`; :" -"func:`ctypes.get_last_error` y :func:`ctypes.set_last_error` se utilizan para " -"solicitar y cambiar la copia privada ctypes del código de error de Windows." +"El parámetro *use_last_error*, cuando se establece en true, habilita el " +"mismo mecanismo para el código de error de Windows que es administrado por " +"las funciones de la API de Windows :func:`GetLastError` y :func:" +"`SetLastError`; :func:`ctypes.get_last_error` y :func:`ctypes." +"set_last_error` se utilizan para solicitar y cambiar la copia privada ctypes " +"del código de error de Windows." #: ../Doc/library/ctypes.rst:1395 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 "" "El parámetro *winmode* se utiliza en Windows para especificar cómo se carga " "la biblioteca (ya que *mode* se ignora). Toma cualquier valor que sea válido " "para el parámetro flags de la API de Win32 ``LoadLibraryEx``. Cuando se " -"omite, el valor por defecto es usar los flags que resultan en la carga de DLL " -"más segura para evitar problemas como el secuestro de DLL. Pasar la ruta " +"omite, el valor por defecto es usar los flags que resultan en la carga de " +"DLL más segura para evitar problemas como el secuestro de DLL. Pasar la ruta " "completa a la DLL es la forma más segura de asegurar que se cargan la " "biblioteca y las dependencias correctas." @@ -1822,7 +1833,7 @@ msgid "" "Flag to use as *mode* parameter. On platforms where this flag is not " "available, it is defined as the integer zero." msgstr "" -"Flag para usar como parámetro *modo*. En las plataformas en las que esta " +"Flag para usar como parámetro *modo*. En las plataformas en las que esta " "bandera no está disponible, se define como el cero entero." #: ../Doc/library/ctypes.rst:1416 @@ -1830,7 +1841,7 @@ msgid "" "Flag to use as *mode* parameter. On platforms where this is not available, " "it is the same as *RTLD_GLOBAL*." msgstr "" -"Flag para usar como parámetro *modo*. En las plataformas en las que esto no " +"Flag para usar como parámetro *modo*. En las plataformas en las que esto no " "está disponible, es lo mismo que *RTLD_GLOBAL*." #: ../Doc/library/ctypes.rst:1423 @@ -1838,23 +1849,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 "" -"El modo por defecto que se utiliza para cargar las bibliotecas compartidas. " +"El modo por defecto que se utiliza para cargar las bibliotecas compartidas. " "En OSX 10.3, esto es *RTLD_GLOBAL*, de lo contrario es lo mismo que " "*RTLD_LOCAL*." #: ../Doc/library/ctypes.rst:1426 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 "" -"Las instancias de estas clases no tienen métodos públicos. Se puede acceder " +"Las instancias de estas clases no tienen métodos públicos. Se puede acceder " "a las funciones exportadas por la biblioteca compartida como atributos o por " -"índice. Tenga en cuenta que al acceder a la función a través de un atributo " +"índice. Tenga en cuenta que al acceder a la función a través de un atributo " "se almacena en caché el resultado y, por lo tanto, al acceder a él " -"repetidamente se retorna el mismo objeto cada vez. Por otro lado, acceder a " +"repetidamente se retorna el mismo objeto cada vez. Por otro lado, acceder a " "ella a través de un índice retorna un nuevo objeto cada vez::" #: ../Doc/library/ctypes.rst:1439 @@ -1881,16 +1892,16 @@ msgid "" "attribute of the loader instance." msgstr "" "Las bibliotecas compartidas también pueden ser cargadas usando uno de los " -"objetos prefabricados, que son instancias de la clase :class:`LibraryLoader`, " -"ya sea llamando al método :meth:`LoadLibrary`, o recuperando la biblioteca " -"como atributo de la instancia de carga." +"objetos prefabricados, que son instancias de la clase :class:" +"`LibraryLoader`, ya sea llamando al método :meth:`LoadLibrary`, o " +"recuperando la biblioteca como atributo de la instancia de carga." #: ../Doc/library/ctypes.rst:1460 msgid "" "Class which loads shared libraries. *dlltype* should be one of the :class:" "`CDLL`, :class:`PyDLL`, :class:`WinDLL`, or :class:`OleDLL` types." msgstr "" -"Clase que carga bibliotecas compartidas. *dlltype* debe ser uno de los " +"Clase que carga bibliotecas compartidas. *dlltype* debe ser uno de los " "tipos :class:`CDLL`, :class:`PyDLL`, :class:`WinDLL`, o :class:`OleDLL`." #: ../Doc/library/ctypes.rst:1463 @@ -1901,7 +1912,7 @@ msgid "" msgstr "" ":meth:`__getattr__` tiene un comportamiento especial: Permite cargar una " "biblioteca compartida accediendo a ella como atributo de una instancia de " -"carga de biblioteca. El resultado se almacena en caché, de modo que los " +"carga de biblioteca. El resultado se almacena en caché, de modo que los " "accesos repetidos a los atributos retornan la misma biblioteca cada vez." #: ../Doc/library/ctypes.rst:1469 @@ -1909,7 +1920,7 @@ msgid "" "Load a shared library into the process and return it. This method always " "returns a new instance of the library." msgstr "" -"Carga una biblioteca compartida en el proceso y la retorna. Este método " +"Carga una biblioteca compartida en el proceso y la retorna. Este método " "siempre retorna una nueva instancia de la biblioteca." #: ../Doc/library/ctypes.rst:1473 @@ -1934,8 +1945,8 @@ msgstr "Crea instancias de :class:`PyDLL`." #: ../Doc/library/ctypes.rst:1499 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 "" "Para acceder directamente a la API C de Python, se dispone de un objeto de " "biblioteca compartida de Python listo-para-usar:" @@ -1948,35 +1959,34 @@ msgid "" "correct :attr:`restype` attribute to use these functions." msgstr "" "Una instancia de :class:`PyDLL` que expone las funciones de la API C de " -"Python como atributos. Ten en cuenta que se supone que todas estas funciones " +"Python como atributos. Ten en cuenta que se supone que todas estas funciones " "retornan C :c:type:`int`, lo que por supuesto no siempre es cierto, así que " "tienes que asignar el atributo correcto :attr:`restype` para usar estas " "funciones." -#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlopen`` with argument " "``name``." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.dlopen`` con el argumento " -"``name``." +"Lanza un :ref:`evento de auditoría ` ``ctypes.dlopen`` con " +"argumento ``name``." #: ../Doc/library/ctypes.rst:1512 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 "" "Cargar una biblioteca a través de cualquiera de estos objetos lanza un :ref:" -"`evento de auditoría ` ``ctypes.dlopen`` con el argumento de cadena " -"``name``, el nombre usado para cargar la biblioteca." +"`evento de auditoría ` ``ctypes.dlopen`` con el argumento de " +"cadena ``name``, el nombre usado para cargar la biblioteca." msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym`` with arguments " "``library``, ``name``." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.dlsym`` con argumentos " -"``library``, ``name``." +"Lanza un :ref:`evento de auditoría ` ``ctypes.dlsym`` con " +"argumentos ``library``, ``name``." #: ../Doc/library/ctypes.rst:1518 msgid "" @@ -1992,7 +2002,7 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.dlsym/handle`` with " "arguments ``handle``, ``name``." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.dlsym/handle`` con " +"Lanza un :ref:`evento de auditoría ` ``ctypes.dlsym/handle`` con " "argumentos ``handle``, ``name``." #: ../Doc/library/ctypes.rst:1524 @@ -2001,10 +2011,10 @@ msgid "" "accessing a function raises an auditing event ``ctypes.dlsym/handle`` with " "arguments ``handle`` (the raw library handle) and ``name``." msgstr "" -"En los casos en los que sólo está disponible el manejador de la biblioteca en " -"lugar del objeto, al acceder a una función se produce un evento de auditoría " -"``ctypes.dlsym/handle`` con los argumentos ``handle`` (el manejador de la " -"biblioteca en bruto) y ``name``." +"En los casos en los que sólo está disponible el manejador de la biblioteca " +"en lugar del objeto, al acceder a una función se produce un evento de " +"auditoría ``ctypes.dlsym/handle`` con los argumentos ``handle`` (el " +"manejador de la biblioteca en bruto) y ``name``." #: ../Doc/library/ctypes.rst:1531 msgid "Foreign functions" @@ -2019,7 +2029,7 @@ msgid "" "library loader. They are instances of a private class:" msgstr "" "Como se explicó en la sección anterior, se puede acceder a las funciones " -"foráneas como atributos de las bibliotecas compartidas cargadas. Los objetos " +"foráneas como atributos de las bibliotecas compartidas cargadas. Los objetos " "de función creados de esta forma aceptan por defecto cualquier número de " "argumentos, aceptan cualquier instancia de datos ctypes como argumentos y " "retornan el tipo de resultado por defecto especificado por el cargador de la " @@ -2042,8 +2052,8 @@ msgid "" "This behavior can be customized by assigning to special attributes of the " "foreign function object." msgstr "" -"Este comportamiento puede personalizarse asignando a los atributos especiales " -"del objeto de la función foránea." +"Este comportamiento puede personalizarse asignando a los atributos " +"especiales del objeto de la función foránea." #: ../Doc/library/ctypes.rst:1552 msgid "" @@ -2063,42 +2073,42 @@ msgid "" "callable to the :attr:`errcheck` attribute." msgstr "" "Es posible asignar un objeto Python invocable que no sea de tipo ctypes, en " -"este caso se supone que la función retorna un C :c:type:`int`, y el invocable " -"se llamará con este entero, lo que permite un posterior procesamiento o " -"comprobación de errores. El uso de esto está obsoleto, para un " -"postprocesamiento más flexible o para la comprobación de errores utilice un " -"tipo de datos ctypes como :attr:`restype` y asigne un invocable al atributo :" -"attr:`errcheck`." +"este caso se supone que la función retorna un C :c:type:`int`, y el " +"invocable se llamará con este entero, lo que permite un posterior " +"procesamiento o comprobación de errores. El uso de esto está obsoleto, para " +"un postprocesamiento más flexible o para la comprobación de errores utilice " +"un tipo de datos ctypes como :attr:`restype` y asigne un invocable al " +"atributo :attr:`errcheck`." #: ../Doc/library/ctypes.rst:1564 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 "" -"Asigne una tupla de tipos ctypes para especificar los tipos de argumentos que " -"acepta la función. Las funciones que utilizan la convención de llamada " -"\"stdcall\" sólo pueden ser llamadas con el mismo número de argumentos que la " -"longitud de esta tupla; las funciones que utilizan la convención de llamada C " -"aceptan también argumentos adicionales no especificados." +"Asigne una tupla de tipos ctypes para especificar los tipos de argumentos " +"que acepta la función. Las funciones que utilizan la convención de llamada " +"``stdcall`` sólo pueden ser llamadas con el mismo número de argumentos que " +"la longitud de esta tupla; las funciones que utilizan la convención de " +"llamada C aceptan también argumentos adicionales no especificados." #: ../Doc/library/ctypes.rst:1570 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 "" "Cuando se llama a una función foránea, cada argumento real se pasa al método " -"de la clase :meth:`from_param` de los elementos de la tupla :attr:`argtypes`, " -"este método permite adaptar el argumento real a un objeto que la función " -"externa acepta. Por ejemplo, un elemento :class:`c_char_p` de la tupla :attr:" -"`argtypes` convertirá una cadena pasada como argumento en un objeto de bytes " -"utilizando reglas de conversión ctypes." +"de la clase :meth:`from_param` de los elementos de la tupla :attr:" +"`argtypes`, este método permite adaptar el argumento real a un objeto que la " +"función externa acepta. Por ejemplo, un elemento :class:`c_char_p` de la " +"tupla :attr:`argtypes` convertirá una cadena pasada como argumento en un " +"objeto de bytes utilizando reglas de conversión ctypes." #: ../Doc/library/ctypes.rst:1577 msgid "" @@ -2110,7 +2120,7 @@ msgstr "" "Nuevo: Ahora es posible poner en argtypes elementos que no son de tipo " "ctypes, pero cada elemento debe tener un método :meth:`from_param` que " "retorne un valor utilizable como argumento (entero, cadena, instancia " -"ctypes). Esto permite definir adaptadores que pueden adaptar objetos " +"ctypes). Esto permite definir adaptadores que pueden adaptar objetos " "personalizados como parámetros de la función." #: ../Doc/library/ctypes.rst:1584 @@ -2169,30 +2179,29 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.seh_exception`` with " "argument ``code``." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.seh_exception`` con el " -"argumento ``code``." +"Lanza un :ref:`evento de auditoría ` ``ctypes.seh_exception`` con " +"el argumento ``code``." #: ../Doc/library/ctypes.rst:1615 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, cuando una llamada a una función foránea plantea una excepción de " -"sistema (por ejemplo, debido a una violación de acceso), será capturada y " +"En Windows, cuando una llamada a una función foránea plantea una excepción " +"de sistema (por ejemplo, debido a una violación de acceso), será capturada y " "sustituida por una excepción Python adecuada. Además, un evento de auditoría " "``ctypes.seh_exception`` con el argumento ``code`` será levantado, " "permitiendo que un gancho de auditoría reemplace la excepción con la suya " "propia." -#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``ctypes.call_function`` with " "arguments ``func_pointer``, ``arguments``." msgstr "" -"Lanza un :ref:`auditing event ` ``ctypes.call_function`` con " +"Lanza un :ref:`evento de auditoría ` ``ctypes.call_function`` con " "argumentos ``func_pointer``, ``arguments``." #: ../Doc/library/ctypes.rst:1623 @@ -2222,7 +2231,7 @@ msgstr "" "Las funciones foráneas también pueden crearse mediante la instanciación de " "prototipos de funciones. Los prototipos de funciones son similares a los " "prototipos de funciones en C; describen una función (tipo de retorno, tipos " -"de argumentos, convención de llamada) sin definir una implementación. Las " +"de argumentos, convención de llamada) sin definir una implementación. Las " "funciones de fábrica deben ser llamadas con el tipo de resultado deseado y " "los tipos de argumento de la función, y pueden ser usadas como fábricas de " "decoradores, y como tales, ser aplicadas a las funciones a través de la " @@ -2237,7 +2246,7 @@ msgid "" "after the call; *use_last_error* does the same for the Windows error code." msgstr "" "El prototipo de función retornado crea funciones que usan la convención de " -"llamada C estándar. La función liberará el GIL durante la llamada. Si " +"llamada C estándar. La función liberará el GIL durante la llamada. Si " "*use_errno* se configura a true, la copia privada de ctypes de la variable " "del sistema :data:`errno` se intercambia con el valor real :data:`errno` " "antes y después de la llamada; *use_last_error* hace lo mismo con el código " @@ -2252,28 +2261,28 @@ msgid "" "meaning as above." msgstr "" "Sólo Windows: El prototipo de función retornado crea funciones que usan la " -"convención de llamada \"STDCALL\", excepto en Windows CE donde :func:" -"`WINFUNCTYPE` es lo mismo que :func:`CFUNCTYPE`. La función lanzará el GIL " -"durante la llamada. *use_errno* y *use_last_error* tienen el mismo " +"convención de llamada ``stdcall``, excepto en Windows CE donde :func:" +"`WINFUNCTYPE` es lo mismo que :func:`CFUNCTYPE`. La función lanzará el GIL " +"durante la llamada. *use_errno* y *use_last_error* tienen el mismo " "significado que arriba." #: ../Doc/library/ctypes.rst:1661 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 "" "El prototipo de función retornado crea funciones que usan la convención de " -"llamadas de Python. La función *no* liberará el GIL durante la llamada." +"llamadas de Python. La función *no* liberará el GIL durante la llamada." #: ../Doc/library/ctypes.rst:1664 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 "" -"Los prototipos de funciones creados por estas funciones de fábrica pueden ser " -"instanciados de diferentes maneras, dependiendo del tipo y el número de los " -"parámetros en la llamada:" +"Los prototipos de funciones creados por estas funciones de fábrica pueden " +"ser instanciados de diferentes maneras, dependiendo del tipo y el número de " +"los parámetros en la llamada:" #: ../Doc/library/ctypes.rst:1672 msgid "" @@ -2293,14 +2302,14 @@ msgstr "" 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 "" "Retorna una función foránea exportada por una biblioteca compartida. " "*func_spec* debe ser un 2-tupla ``(name_or_ordinal, library)``. El primer " -"elemento es el nombre de la función exportada como cadena, o el ordinal de la " -"función exportada como entero pequeño. El segundo elemento es la instancia " -"de la biblioteca compartida." +"elemento es el nombre de la función exportada como cadena, o el ordinal de " +"la función exportada como entero pequeño. El segundo elemento es la " +"instancia de la biblioteca compartida." #: ../Doc/library/ctypes.rst:1696 msgid "" @@ -2322,16 +2331,16 @@ msgid "" "specified in the :attr:`argtypes` tuple." msgstr "" "Los métodos COM usan una convención especial de llamadas: Requieren un " -"puntero a la interfaz COM como primer argumento, además de los parámetros que " -"se especifican en la tupla :attr:`argtypes`." +"puntero a la interfaz COM como primer argumento, además de los parámetros " +"que se especifican en la tupla :attr:`argtypes`." #: ../Doc/library/ctypes.rst:1705 msgid "" "The optional *paramflags* parameter creates foreign function wrappers with " "much more functionality than the features described above." msgstr "" -"El parámetro opcional *paramflags* crea envoltorios de funciones foráneas con " -"mucha más funcionalidad que las características descritas anteriormente." +"El parámetro opcional *paramflags* crea envoltorios de funciones foráneas " +"con mucha más funcionalidad que las características descritas anteriormente." #: ../Doc/library/ctypes.rst:1708 msgid "*paramflags* must be a tuple of the same length as :attr:`argtypes`." @@ -2343,8 +2352,8 @@ msgid "" "Each item in this tuple contains further information about a parameter, it " "must be a tuple containing one, two, or three items." msgstr "" -"Cada elemento de esta tupla contiene más información sobre un parámetro, debe " -"ser una tupla que contenga uno, dos o tres elementos." +"Cada elemento de esta tupla contiene más información sobre un parámetro, " +"debe ser una tupla que contenga uno, dos o tres elementos." #: ../Doc/library/ctypes.rst:1713 msgid "" @@ -2368,7 +2377,7 @@ msgstr "2" #: ../Doc/library/ctypes.rst:1720 msgid "Output parameter. The foreign function fills in a value." -msgstr "Parámetro de salida. La función foránea rellena un valor." +msgstr "Parámetro de salida. La función foránea rellena un valor." #: ../Doc/library/ctypes.rst:1723 msgid "4" @@ -2383,7 +2392,7 @@ 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 "" -"El segundo elemento opcional es el nombre del parámetro como cadena. Si se " +"El segundo elemento opcional es el nombre del parámetro como cadena. Si se " "especifica esto, se puede llamar a la función foránea con parámetros con " "nombre." @@ -2393,9 +2402,9 @@ msgstr "El tercer elemento opcional es el valor por defecto de este parámetro." #: ../Doc/library/ctypes.rst:1730 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 "" "Este ejemplo demuestra cómo envolver la función ``MessageBoxW`` de Windows " "para que soporte los parámetros por defecto y los argumentos con nombre. La " @@ -2411,14 +2420,15 @@ msgstr "La función foránea de ``MessageBox`` puede ser llamada de esta manera: #: ../Doc/library/ctypes.rst:1755 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 "" -"Un segundo ejemplo demuestra los parámetros de salida. La función " +"Un segundo ejemplo demuestra los parámetros de salida. La función " "``GetWindowRect`` de win32 retorna las dimensiones de una ventana " "especificada copiándolas en la estructura ``RECT`` que la persona que llama " -"tiene que suministrar. Aquí está la declaración C::" +"tiene que suministrar. Aquí está la declaración C::" #: ../Doc/library/ctypes.rst:1773 msgid "" @@ -2428,8 +2438,8 @@ msgid "" "now returns a RECT instance, when called." msgstr "" "Las funciones con parámetros de salida retornarán automáticamente el valor " -"del parámetro de salida si hay uno solo, o una tupla que contiene los valores " -"del parámetro de salida cuando hay más de uno, por lo que la función " +"del parámetro de salida si hay uno solo, o una tupla que contiene los " +"valores del parámetro de salida cuando hay más de uno, por lo que la función " "GetWindowRect retorna ahora una instancia RECT, cuando se llama." #: ../Doc/library/ctypes.rst:1778 @@ -2441,10 +2451,10 @@ msgid "" "call failed::" msgstr "" "Los parámetros de salida pueden combinarse con el protocolo :attr:`errcheck` " -"para hacer un mayor procesamiento de la salida y la comprobación de errores. " -"La función api de win32 ``GetWindowRect`` retorna un ``BOOL`` para señalar el " -"éxito o el fracaso, por lo que esta función podría hacer la comprobación de " -"errores, y plantea una excepción cuando la llamada api ha fallado::" +"para hacer un mayor procesamiento de la salida y la comprobación de errores. " +"La función api de win32 ``GetWindowRect`` retorna un ``BOOL`` para señalar " +"el éxito o el fracaso, por lo que esta función podría hacer la comprobación " +"de errores, y plantea una excepción cuando la llamada api ha fallado::" #: ../Doc/library/ctypes.rst:1791 msgid "" @@ -2456,9 +2466,9 @@ msgid "" msgstr "" "Si la función :attr:`errcheck` retorna la tupla de argumentos que recibe sin " "cambios, :mod:`ctypes` continúa el procesamiento normal que hace en los " -"parámetros de salida. Si quieres retornar una tupla de coordenadas de " -"ventana en lugar de una instancia ``RECT``, puedes recuperar los campos de la " -"función y retornarlos en su lugar, el procesamiento normal ya no tendrá " +"parámetros de salida. Si quieres retornar una tupla de coordenadas de " +"ventana en lugar de una instancia ``RECT``, puedes recuperar los campos de " +"la función y retornarlos en su lugar, el procesamiento normal ya no tendrá " "lugar::" #: ../Doc/library/ctypes.rst:1810 @@ -2470,13 +2480,13 @@ msgid "" "Returns the address of the memory buffer as integer. *obj* must be an " "instance of a ctypes type." msgstr "" -"Retorna la dirección del buffer de memoria como un entero. *obj* debe ser " +"Retorna la dirección del buffer de memoria como un entero. *obj* debe ser " "una instancia de tipo ctypes." #: ../Doc/library/ctypes.rst:1817 msgid "" -"Raises an :ref:`auditing event ` ``ctypes.addressof`` with argument " -"``obj``." +"Raises an :ref:`auditing event ` ``ctypes.addressof`` with " +"argument ``obj``." msgstr "" "Lanza un :ref:`evento de auditoría ` ``ctypes.addressof`` con el " "argumento ``obj``." @@ -2496,17 +2506,17 @@ msgid "" "added to the internal pointer value." msgstr "" "Retorna un puntero ligero a *obj*, que debe ser un ejemplo de un tipo de " -"ctypes. *offset* es por defecto cero, y debe ser un entero que se añadirá al " +"ctypes. *offset* es por defecto cero, y debe ser un entero que se añadirá al " "valor del puntero interno." #: ../Doc/library/ctypes.rst:1832 msgid "``byref(obj, offset)`` corresponds to this C code::" -msgstr "\"byref (obj, offset)\" corresponde a este código C::" +msgstr "``byref(obj, offset)` corresponde a este código C::" #: ../Doc/library/ctypes.rst:1836 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 "" "El objeto retornado sólo puede ser utilizado como un parámetro de llamada de " "función foránea. Se comporta de manera similar a ``pointer(obj)``, pero la " @@ -2514,13 +2524,13 @@ msgstr "" #: ../Doc/library/ctypes.rst:1842 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 "" "Esta función es similar a la del operador de reparto en C. retorna una nueva " -"instancia de *type* que apunta al mismo bloque de memoria que *obj*. *type* " +"instancia de *type* que apunta al mismo bloque de memoria que *obj*. *type* " "debe ser un tipo de puntero, y *obj* debe ser un objeto que pueda ser " "interpretado como un puntero." @@ -2534,26 +2544,26 @@ msgstr "" #: ../Doc/library/ctypes.rst:1853 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 "" "*init_or_size* debe ser un número entero que especifique el tamaño del " -"arreglo, o un objeto de bytes que se utilizará para inicializar los elementos " -"del arreglo." +"arreglo, o un objeto de bytes que se utilizará para inicializar los " +"elementos del arreglo." #: ../Doc/library/ctypes.rst:1856 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 "" "Si se especifica un objeto bytes como primer argumento, el buffer se hace un " "elemento más grande que su longitud, de modo que el último elemento del " "arreglo es un carácter de terminación NUL. Se puede pasar un entero como " -"segundo argumento que permite especificar el tamaño del arreglo si no se debe " -"utilizar la longitud de los bytes." +"segundo argumento que permite especificar el tamaño del arreglo si no se " +"debe utilizar la longitud de los bytes." #: ../Doc/library/ctypes.rst:1861 msgid "" @@ -2565,16 +2575,16 @@ msgstr "" #: ../Doc/library/ctypes.rst:1866 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 "" -"Esta función crea un búfer de caracteres unicode mutable. El objeto retornado " -"es un arreglo de ctypes de :class:`c_wchar`." +"Esta función crea un búfer de caracteres unicode mutable. El objeto " +"retornado es un arreglo de ctypes de :class:`c_wchar`." #: ../Doc/library/ctypes.rst:1869 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 "" "*init_or_size* debe ser un entero que especifique el tamaño del arreglo, o " "una cadena que se utilizará para inicializar los elementos del arreglo." @@ -2582,8 +2592,8 @@ msgstr "" #: ../Doc/library/ctypes.rst:1872 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 "" @@ -2604,11 +2614,11 @@ msgstr "" #: ../Doc/library/ctypes.rst:1883 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 "" "Sólo Windows: Esta función es un gancho que permite implementar servidores " -"COM en proceso con ctypes. Se llama desde la función DllCanUnloadNow que la " +"COM en proceso con ctypes. Se llama desde la función DllCanUnloadNow que la " "extensión _ctypes dll exporta." #: ../Doc/library/ctypes.rst:1890 @@ -2618,20 +2628,20 @@ msgid "" "that the ``_ctypes`` extension dll exports." msgstr "" "Sólo Windows: Esta función es un gancho que permite implementar servidores " -"COM en proceso con ctypes. Se llama desde la función DllGetClassObject que " +"COM en proceso con ctypes. Se llama desde la función DllGetClassObject que " "la extensión ``_ctypes`` exporta." #: ../Doc/library/ctypes.rst:1898 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 " +"number (this is the form used for the posix linker option :option:`!-l`). If " "no library can be found, returns ``None``." msgstr "" -"Intenta encontrar una biblioteca y retornar un nombre. *name* es el nombre " +"Intenta encontrar una biblioteca y retornar un nombre. *name* es el nombre " "de la biblioteca sin ningún prefijo como ``lib``, sufijo como ``.so``, ``." "dylib`` o número de versión (esta es la forma usada para la opción del " -"enlazador posix :option:`!-l`). Si no se puede encontrar ninguna biblioteca, " +"enlazador posix :option:`!-l`). Si no se puede encontrar ninguna biblioteca, " "retorna ``None``." #: ../Doc/library/ctypes.rst:1909 @@ -2641,7 +2651,7 @@ msgid "" "determined, ``None`` is returned." msgstr "" "Sólo Windows: retorna el nombre de archivo de la biblioteca de tiempo de " -"ejecución de VC usada por Python, y por los módulos de extensión. Si no se " +"ejecución de VC usada por Python, y por los módulos de extensión. Si no se " "puede determinar el nombre de la biblioteca, se retorna ``None``." #: ../Doc/library/ctypes.rst:1913 @@ -2650,9 +2660,9 @@ msgid "" "with a call to the ``free(void *)``, it is important that you use the " "function in the same library that allocated the memory." msgstr "" -"Si necesita liberar memoria, por ejemplo, asignada por un módulo de extensión " -"con una llamada al ``free(void *)``, es importante que utilice la función en " -"la misma biblioteca que asignó la memoria." +"Si necesita liberar memoria, por ejemplo, asignada por un módulo de " +"extensión con una llamada al ``free(void *)``, es importante que utilice la " +"función en la misma biblioteca que asignó la memoria." #: ../Doc/library/ctypes.rst:1920 msgid "" @@ -2660,9 +2670,9 @@ msgid "" "error code is specified, the last error code is used by calling the Windows " "api function GetLastError." msgstr "" -"Sólo Windows: retorna una descripción textual del código de error *code*. Si " -"no se especifica ningún código de error, se utiliza el último código de error " -"llamando a la función de api de Windows GetLastError." +"Sólo Windows: retorna una descripción textual del código de error *code*. Si " +"no se especifica ningún código de error, se utiliza el último código de " +"error llamando a la función de api de Windows GetLastError." #: ../Doc/library/ctypes.rst:1927 msgid "" @@ -2670,18 +2680,18 @@ msgid "" "thread. This function calls the Windows `GetLastError()` function directly, " "it does not return the ctypes-private copy of the error code." msgstr "" -"Sólo Windows: retorna el último código de error establecido por Windows en el " -"hilo de llamada. Esta función llama directamente a la función " -"`GetLastError()` de Windows, no retorna la copia ctypes-private del código de " -"error." +"Sólo Windows: retorna el último código de error establecido por Windows en " +"el hilo de llamada. Esta función llama directamente a la función " +"`GetLastError()` de Windows, no retorna la copia ctypes-private del código " +"de error." #: ../Doc/library/ctypes.rst:1933 msgid "" "Returns the current value of the ctypes-private copy of the system :data:" "`errno` variable in the calling thread." msgstr "" -"Retorna el valor actual de la copia ctypes-private de la variable de sistema :" -"data:`errno` en el hilo de llamada." +"Retorna el valor actual de la copia ctypes-private de la variable de " +"sistema :data:`errno` en el hilo de llamada." #: ../Doc/library/ctypes.rst:1936 msgid "" @@ -2710,12 +2720,12 @@ msgstr "" #: ../Doc/library/ctypes.rst:1947 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 "" -"Igual que la función de la biblioteca estándar de C *memmove*: copia *count* " -"bytes de *src* a *dst*. *dst* y *src* deben ser enteros o instancias ctypes " -"que pueden ser convertidos en punteros." +"Igual que la función de la biblioteca estándar de C *memmove*: copia " +"*count* bytes de *src* a *dst*. *dst* y *src* deben ser enteros o instancias " +"ctypes que pueden ser convertidos en punteros." #: ../Doc/library/ctypes.rst:1954 msgid "" @@ -2724,9 +2734,9 @@ msgid "" "specifying an address, or a ctypes instance." msgstr "" "Igual que la función de la biblioteca estándar de C *memset* C: llena el " -"bloque de memoria en la dirección *dst* con *count* bytes de valor *c*. *dst* " -"debe ser un número entero que especifique una dirección, o una instancia " -"ctypes." +"bloque de memoria en la dirección *dst* con *count* bytes de valor *c*. " +"*dst* debe ser un número entero que especifique una dirección, o una " +"instancia ctypes." #: ../Doc/library/ctypes.rst:1961 msgid "" @@ -2741,8 +2751,8 @@ msgstr "" #: ../Doc/library/ctypes.rst:1968 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 "" "Esta función crea una nueva instancia de puntero, apuntando a *obj*. El " "objeto retornado es del tipo ``POINTER(tipo(obj))``." @@ -2763,9 +2773,9 @@ msgid "" "but it is possible to enlarge the buffer." msgstr "" "Esta función redimensiona el búfer de memoria interna de *obj*, que debe ser " -"una instancia de tipo ctypes. No es posible hacer el buffer más pequeño que " -"el tamaño nativo del tipo de objetos, como lo indica ``size of (type(obj))``, " -"pero es posible agrandar el buffer." +"una instancia de tipo ctypes. No es posible hacer el buffer más pequeño que " +"el tamaño nativo del tipo de objetos, como lo indica ``size of " +"(type(obj))``, pero es posible agrandar el buffer." #: ../Doc/library/ctypes.rst:1985 msgid "" @@ -2777,17 +2787,17 @@ msgstr "" #: ../Doc/library/ctypes.rst:1988 msgid "" -"Raises an :ref:`auditing event ` ``ctypes.set_errno`` with argument " -"``errno``." +"Raises an :ref:`auditing event ` ``ctypes.set_errno`` with " +"argument ``errno``." msgstr "" "Lanza un :ref:`evento de auditoría ` ``ctypes.set_errno`` con " "argumento ``errno``." #: ../Doc/library/ctypes.rst:1993 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 "" "Sólo para Windows: pone el valor actual de la copia ctypes-private de la " "variable del sistema :data:`LastError` en el hilo de llamada a *valor* y " @@ -2830,13 +2840,14 @@ msgstr "" #: ../Doc/library/ctypes.rst:2017 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 "" -"Sólo para Windows: esta función es probablemente la cosa peor nombrada de los " -"ctypes. Crea una instancia de OSError. Si no se especifica el *code*, se " -"llama a \"GetLastError\" para determinar el código de error. Si no se " +"Sólo para Windows: esta función es probablemente la cosa peor nombrada de " +"los ctypes. Crea una instancia de OSError. Si no se especifica el *code*, se " +"llama a ``GetLastError`` para determinar el código de error. Si no se " "especifica *descr*, se llama a :func:`FormatError`` para obtener una " "descripción textual del error." @@ -2852,7 +2863,7 @@ msgid "" "terminated." msgstr "" "Esta función retorna la cadena de caracteres anchos que comienza en la " -"dirección de memoria *address* como una cadena. Si se especifica *size*, se " +"dirección de memoria *address* como una cadena. Si se especifica *size*, se " "utiliza como el número de caracteres de la cadena, de lo contrario se asume " "que la cadena tiene un final cero." @@ -2881,9 +2892,9 @@ msgstr "" "de los ctypes. Entre otras cosas, todas las instancias de tipo ctypes " "contienen un bloque de memoria que contiene datos compatibles con C; la " "dirección del bloque de memoria es retornada por la función de ayuda :func:" -"`addressof`. Otra variable de instancia se expone como :attr:`_objetos`; ésta " -"contiene otros objetos de Python que deben mantenerse vivos en caso de que el " -"bloque de memoria contenga punteros." +"`addressof`. Otra variable de instancia se expone como :attr:`_objetos`; " +"ésta contiene otros objetos de Python que deben mantenerse vivos en caso de " +"que el bloque de memoria contenga punteros." #: ../Doc/library/ctypes.rst:2052 msgid "" @@ -2897,14 +2908,14 @@ 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 "" "Este método retorna una instancia ctypes que comparte el buffer del objeto " -"*source*. El objeto *source* debe soportar la interfaz del buffer de " -"escritura. El parámetro opcional *offset* especifica un offset en el buffer " -"de la fuente en bytes; el valor por defecto es cero. Si el buffer de la " +"*source*. El objeto *source* debe soportar la interfaz del buffer de " +"escritura. El parámetro opcional *offset* especifica un offset en el buffer " +"de la fuente en bytes; el valor por defecto es cero. Si el buffer de la " "fuente no es lo suficientemente grande se lanza un :exc:`ValueError`." #: ../Doc/library/ctypes.rst:2063 ../Doc/library/ctypes.rst:2073 @@ -2919,13 +2930,13 @@ 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 "" "Este método crea una instancia ctypes, copiando el buffer del buffer de " -"objetos *source* que debe ser legible. El parámetro opcional *offset* " -"especifica un offset en el buffer de origen en bytes; el valor por defecto es " -"cero. Si el buffer de fuente no es lo suficientemente grande se lanza un :" +"objetos *source* que debe ser legible. El parámetro opcional *offset* " +"especifica un offset en el buffer de origen en bytes; el valor por defecto " +"es cero. Si el buffer de fuente no es lo suficientemente grande se lanza un :" "exc:`ValueError`." #: ../Doc/library/ctypes.rst:2077 @@ -2940,8 +2951,8 @@ msgid "" "Raises an :ref:`auditing event ` ``ctypes.cdata`` with argument " "``address``." msgstr "" -"Lanza un :ref:`evento de auditoría ` ``ctypes.cdata`` con argumento " -"``address``." +"Lanza un :ref:`evento de auditoría ` ``ctypes.cdata`` con " +"argumento ``address``." #: ../Doc/library/ctypes.rst:2082 msgid "" @@ -2958,20 +2969,20 @@ msgid "" "foreign function's :attr:`argtypes` tuple; it must return an object that can " "be used as a function call parameter." msgstr "" -"Este método adapta el *obj* a un tipo de ctypes. Se llama con el objeto real " -"usado en una llamada a una función externa cuando el tipo está presente en la " -"tupla :attr:`argtypes` de la función foránea; debe retornar un objeto que " +"Este método adapta el *obj* a un tipo de ctypes. Se llama con el objeto real " +"usado en una llamada a una función externa cuando el tipo está presente en " +"la tupla :attr:`argtypes` de la función foránea; debe retornar un objeto que " "pueda ser usado como parámetro de llamada a la función." #: ../Doc/library/ctypes.rst:2093 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 "" -"Todos los tipos de datos ctypes tienen una implementación por defecto de este " -"método de clase que normalmente retorna *obj* si es una instancia del tipo. " -"Algunos tipos aceptan también otros objetos." +"Todos los tipos de datos ctypes tienen una implementación por defecto de " +"este método de clase que normalmente retorna *obj* si es una instancia del " +"tipo. Algunos tipos aceptan también otros objetos." #: ../Doc/library/ctypes.rst:2099 msgid "" @@ -2979,9 +2990,9 @@ msgid "" "*name* is the name of the symbol that exports the data, *library* is the " "loaded shared library." msgstr "" -"Este método retorna una instancia de tipo ctypes exportada por una biblioteca " -"compartida. *name* es el nombre del símbolo que exporta los datos, *library* " -"es la biblioteca compartida cargada." +"Este método retorna una instancia de tipo ctypes exportada por una " +"biblioteca compartida. *name* es el nombre del símbolo que exporta los " +"datos, *library* es la biblioteca compartida cargada." #: ../Doc/library/ctypes.rst:2103 msgid "Common instance variables of ctypes data types:" @@ -2995,7 +3006,7 @@ msgid "" "block." msgstr "" "A veces, las instancias de datos ctypes no poseen el bloque de memoria que " -"contienen, sino que comparten parte del bloque de memoria de un objeto base. " +"contienen, sino que comparten parte del bloque de memoria de un objeto base. " "El miembro de sólo lectura :attr:`_b_base_` es el objeto raíz ctypes que " "posee el bloque de memoria." @@ -3010,29 +3021,30 @@ msgstr "" #: ../Doc/library/ctypes.rst:2119 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 "" "Este miembro es ``None`` o un diccionario que contiene objetos de Python que " "deben mantenerse vivos para que el contenido del bloque de memoria sea " -"válido. Este objeto sólo se expone para su depuración; nunca modifique el " +"válido. Este objeto sólo se expone para su depuración; nunca modifique el " "contenido de este diccionario." #: ../Doc/library/ctypes.rst:2132 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 "" "Esta clase no pública es la clase base de todos los tipos de datos de ctypes " "fundamentales. Se menciona aquí porque contiene los atributos comunes de los " -"tipos de datos de ctypes fundamentales. :class:`_SimpleCData` es una subclase " -"de :class:`_CData`, por lo que hereda sus métodos y atributos. Los tipos de " -"datos ctypes que no son y no contienen punteros ahora pueden ser archivados." +"tipos de datos de ctypes fundamentales. :class:`_SimpleCData` es una " +"subclase de :class:`_CData`, por lo que hereda sus métodos y atributos. Los " +"tipos de datos ctypes que no son y no contienen punteros ahora pueden ser " +"archivados." #: ../Doc/library/ctypes.rst:2138 msgid "Instances have a single attribute:" @@ -3046,41 +3058,41 @@ msgid "" "bytes object or string." msgstr "" "Este atributo contiene el valor real de la instancia. Para los tipos enteros " -"y punteros, es un entero, para los tipos de caracteres, es un objeto o cadena " -"de bytes de un solo carácter, para los tipos de punteros de caracteres es un " -"objeto o cadena de bytes de Python." +"y punteros, es un entero, para los tipos de caracteres, es un objeto o " +"cadena de bytes de un solo carácter, para los tipos de punteros de " +"caracteres es un objeto o cadena de bytes de Python." #: ../Doc/library/ctypes.rst:2147 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 "" -"Cuando el atributo ``value`` se recupera de una instancia ctypes, normalmente " -"se retorna un nuevo objeto cada vez. :mod:`ctypes` *no* implementa el retorno " -"del objeto original, siempre se construye un nuevo objeto. Lo mismo ocurre " -"con todas las demás instancias de objetos ctypes." +"Cuando el atributo ``value`` se recupera de una instancia ctypes, " +"normalmente se retorna un nuevo objeto cada vez. :mod:`ctypes` *no* " +"implementa el retorno del objeto original, siempre se construye un nuevo " +"objeto. Lo mismo ocurre con todas las demás instancias de objetos ctypes." #: ../Doc/library/ctypes.rst:2153 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 "" "Los tipos de datos fundamentales, cuando se retornan como resultados de " "llamadas de funciones foráneas, o, por ejemplo, al recuperar miembros de " "campo de estructura o elementos de arreglos, se convierten de forma " -"transparente a tipos nativos de Python. En otras palabras, si una función " +"transparente a tipos nativos de Python. En otras palabras, si una función " "externa tiene un :attr:`restype` de :class:`c_char_p`, siempre recibirá un " "objeto de bytes Python, *no* una instancia de :class:`c_char_p`." #: ../Doc/library/ctypes.rst:2161 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 "" @@ -3101,7 +3113,7 @@ msgid "" "overflow checking is done." msgstr "" "Representa el tipo de datos C :c:type:`signed char`, e interpreta el valor " -"como un entero pequeño. El constructor acepta un inicializador de entero " +"como un entero pequeño. El constructor acepta un inicializador de entero " "opcional; no se hace ninguna comprobación de desbordamiento." #: ../Doc/library/ctypes.rst:2177 @@ -3111,7 +3123,7 @@ msgid "" "the length of the string must be exactly one character." msgstr "" "Representa el tipo de datos C :c:type:`char`, e interpreta el valor como un " -"solo carácter. El constructor acepta un inicializador de cadena opcional, la " +"solo carácter. El constructor acepta un inicializador de cadena opcional, la " "longitud de la cadena debe ser exactamente un carácter." #: ../Doc/library/ctypes.rst:2184 @@ -3122,8 +3134,8 @@ msgid "" "integer address, or a bytes object." msgstr "" "Representa el tipo de datos C :c:type:`char *` cuando apunta a una cadena " -"terminada en cero. Para un puntero de carácter general que también puede " -"apuntar a datos binarios, se debe usar ``POINTER(c_char)``. El constructor " +"terminada en cero. Para un puntero de carácter general que también puede " +"apuntar a datos binarios, se debe usar ``POINTER(c_char)``. El constructor " "acepta una dirección entera, o un objeto de bytes." #: ../Doc/library/ctypes.rst:2192 @@ -3131,7 +3143,7 @@ msgid "" "Represents the C :c:type:`double` datatype. The constructor accepts an " "optional float initializer." msgstr "" -"Representa el tipo de datos C :c:type:`double`. El constructor acepta un " +"Representa el tipo de datos C :c:type:`double`. El constructor acepta un " "inicializador flotante opcional." #: ../Doc/library/ctypes.rst:2198 @@ -3140,8 +3152,8 @@ msgid "" "optional float initializer. On platforms where ``sizeof(long double) == " "sizeof(double)`` it is an alias to :class:`c_double`." msgstr "" -"Representa el tipo de datos C :c:type:`long double`. El constructor acepta " -"un inicializador flotante opcional. En las plataformas donde ``sizeof(long " +"Representa el tipo de datos C :c:type:`long double`. El constructor acepta " +"un inicializador flotante opcional. En las plataformas donde ``sizeof(long " "double) == sizeof(double)`` es un alias de :class:`c_double`." #: ../Doc/library/ctypes.rst:2204 @@ -3149,7 +3161,7 @@ msgid "" "Represents the C :c:type:`float` datatype. The constructor accepts an " "optional float initializer." msgstr "" -"Representa el tipo de datos C :c:type:`float`. El constructor acepta un " +"Representa el tipo de datos C :c:type:`float`. El constructor acepta un " "inicializador flotante opcional." #: ../Doc/library/ctypes.rst:2210 @@ -3158,9 +3170,9 @@ msgid "" "optional integer initializer; no overflow checking is done. On platforms " "where ``sizeof(int) == sizeof(long)`` it is an alias to :class:`c_long`." msgstr "" -"Representa el tipo de datos C :c:type:`signed int`. El constructor acepta un " +"Representa el tipo de datos C :c:type:`signed int`. El constructor acepta un " "inicializador entero opcional; no se hace ninguna comprobación de " -"desbordamiento. En plataformas donde ``sizeof(int) == sizeof(long)`` es un " +"desbordamiento. En plataformas donde ``sizeof(int) == sizeof(long)`` es un " "alias de :class:`c_long`." #: ../Doc/library/ctypes.rst:2217 @@ -3168,31 +3180,31 @@ msgid "" "Represents the C 8-bit :c:type:`signed int` datatype. Usually an alias for :" "class:`c_byte`." msgstr "" -"Representa el tipo de datos C 8-bit :c:type:`signed int`. Normalmente un " +"Representa el tipo de datos C 8-bit :c:type:`signed int`. Normalmente un " "alias para :class:`c_byte`." #: ../Doc/library/ctypes.rst:2223 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 "" -"Representa el tipo de datos C 16-bit :c:type:`signed int`. Normalmente un " +"Representa el tipo de datos C 16-bit :c:type:`signed int`. Normalmente un " "alias para :class:`c_short`." #: ../Doc/library/ctypes.rst:2229 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 "" -"Representa el tipo de datos C 32-bit :c:type:`signed int`. Normalmente un " +"Representa el tipo de datos C 32-bit :c:type:`signed int`. Normalmente un " "alias para :class:`c_int`." #: ../Doc/library/ctypes.rst:2235 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 "" -"Representa el tipo de datos C 64-bit :c:type:`signed int`. Normalmente un " +"Representa el tipo de datos C 64-bit :c:type:`signed int`. Normalmente un " "alias para :class:`c_longlong`." #: ../Doc/library/ctypes.rst:2241 @@ -3200,7 +3212,7 @@ msgid "" "Represents the C :c:type:`signed long` datatype. The constructor accepts an " "optional integer initializer; no overflow checking is done." msgstr "" -"Representa el tipo de datos C :c:type:`signed long`. El constructor acepta " +"Representa el tipo de datos C :c:type:`signed long`. El constructor acepta " "un inicializador entero opcional; no se hace ninguna comprobación de " "desbordamiento." @@ -3209,16 +3221,16 @@ msgid "" "Represents the C :c:type:`signed long long` datatype. The constructor " "accepts an optional integer initializer; no overflow checking is done." msgstr "" -"Representa el tipo de datos C :c:type:`significado long long`. El " +"Representa el tipo de datos C :c:type:`significado long long`. El " "constructor acepta un inicializador entero opcional; no se hace ninguna " "comprobación de desbordamiento." #: ../Doc/library/ctypes.rst:2253 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 "" -"Representa el tipo de datos C :c:type:`signed short`. El constructor acepta " +"Representa el tipo de datos C :c:type:`signed short`. El constructor acepta " "un inicializador entero opcional; no se hace ninguna comprobación de " "desbordamiento." @@ -3232,23 +3244,23 @@ msgstr "Representa el tipo de datos C :c:type:`ssize_t`." #: ../Doc/library/ctypes.rst:2271 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 "" "Representa el tipo de datos C :c:type:`unsigned char`, interpreta el valor " -"como un entero pequeño. El constructor acepta un inicializador entero " +"como un entero pequeño. El constructor acepta un inicializador entero " "opcional; no se hace ninguna comprobación de desbordamiento." #: ../Doc/library/ctypes.rst:2278 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 "" -"Representa el tipo de datos C :c:type:`unsigned int`. El constructor acepta " +"Representa el tipo de datos C :c:type:`unsigned int`. El constructor acepta " "un inicializador entero opcional; no se hace ninguna comprobación de " -"desbordamiento. En plataformas donde ``sizeof(int) == sizeof(long)`` es un " +"desbordamiento. En plataformas donde ``sizeof(int) == sizeof(long)`` es un " "alias para :class:`c_ulong`." #: ../Doc/library/ctypes.rst:2285 @@ -3256,7 +3268,7 @@ msgid "" "Represents the C 8-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_ubyte`." msgstr "" -"Representa el tipo de datos C 8-bit :c:type:`unsigned int`. Normalmente un " +"Representa el tipo de datos C 8-bit :c:type:`unsigned int`. Normalmente un " "alias para :class:`c_ubyte`." #: ../Doc/library/ctypes.rst:2291 @@ -3264,7 +3276,7 @@ msgid "" "Represents the C 16-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_ushort`." msgstr "" -"Representa el tipo de datos C 16-bit :c:type:`unsigned int`. Normalmente un " +"Representa el tipo de datos C 16-bit :c:type:`unsigned int`. Normalmente un " "alias para :class:`c_ushort`." #: ../Doc/library/ctypes.rst:2297 @@ -3272,7 +3284,7 @@ msgid "" "Represents the C 32-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_uint`." msgstr "" -"Representa el tipo de datos C 32-bit :c:type:`unsigned int`. Normalmente un " +"Representa el tipo de datos C 32-bit :c:type:`unsigned int`. Normalmente un " "alias para :class:`c_uint`." #: ../Doc/library/ctypes.rst:2303 @@ -3280,7 +3292,7 @@ msgid "" "Represents the C 64-bit :c:type:`unsigned int` datatype. Usually an alias " "for :class:`c_ulonglong`." msgstr "" -"Representa el tipo de datos C 64-bit :c:type:`unsigned int`. Normalmente un " +"Representa el tipo de datos C 64-bit :c:type:`unsigned int`. Normalmente un " "alias para :class:`c_ulonglong`." #: ../Doc/library/ctypes.rst:2309 @@ -3288,7 +3300,7 @@ msgid "" "Represents the C :c:type:`unsigned long` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -"Representa el tipo de datos C :c:type:`unsigned long`. El constructor acepta " +"Representa el tipo de datos C :c:type:`unsigned long`. El constructor acepta " "un inicializador entero opcional; no se hace ninguna comprobación de " "desbordamiento." @@ -3297,7 +3309,7 @@ msgid "" "Represents the C :c:type:`unsigned long long` datatype. The constructor " "accepts an optional integer initializer; no overflow checking is done." msgstr "" -"Representa el tipo de datos C :c:type:`unsigned long long`. El constructor " +"Representa el tipo de datos C :c:type:`unsigned long long`. El constructor " "acepta un inicializador entero opcional; no se hace ninguna comprobación de " "desbordamiento." @@ -3306,16 +3318,16 @@ msgid "" "Represents the C :c:type:`unsigned short` datatype. The constructor accepts " "an optional integer initializer; no overflow checking is done." msgstr "" -"Representa el tipo de datos C :c:type:`unsigned short`. El constructor " +"Representa el tipo de datos C :c:type:`unsigned short`. El constructor " "acepta un inicializador entero opcional; no se hace ninguna comprobación de " "desbordamiento." #: ../Doc/library/ctypes.rst:2327 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 "" -"Representa el tipo C :c:type:`void *`. El valor se representa como un " +"Representa el tipo C :c:type:`void *`. El valor se representa como un " "entero. El constructor acepta un inicializador entero opcional." #: ../Doc/library/ctypes.rst:2333 @@ -3325,7 +3337,7 @@ msgid "" "initializer, the length of the string must be exactly one character." msgstr "" "Representa el tipo de datos C :c:type:`wchar_t`, e interpreta el valor como " -"una cadena unicode de un solo carácter. El constructor acepta un " +"una cadena unicode de un solo carácter. El constructor acepta un " "inicializador de cadena opcional, la longitud de la cadena debe ser " "exactamente de un carácter." @@ -3336,7 +3348,7 @@ msgid "" "address, or a string." msgstr "" "Representa el tipo de datos C :c:type:`wchar_t *`, que debe ser un puntero a " -"una cadena de caracteres anchos con terminación cero. El constructor acepta " +"una cadena de caracteres anchos con terminación cero. El constructor acepta " "una dirección entera, o una cadena." #: ../Doc/library/ctypes.rst:2347 @@ -3346,13 +3358,13 @@ msgid "" "accepts any object that has a truth value." msgstr "" "Representa el tipo de datos C :c:type:`bool` (más exactamente, :c:type:" -"`_Bool` de C99). Su valor puede ser ``True`` o ``False``, y el constructor " +"`_Bool` de C99). Su valor puede ser ``True`` o ``False``, y el constructor " "acepta cualquier objeto que tenga un valor verdadero." #: ../Doc/library/ctypes.rst:2354 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 "" "Sólo Windows: Representa un valor :c:type:`HRESULT` , que contiene " "información de éxito o error para una llamada de función o método." @@ -3362,7 +3374,7 @@ msgid "" "Represents the C :c:type:`PyObject *` datatype. Calling this without an " "argument creates a ``NULL`` :c:type:`PyObject *` pointer." msgstr "" -"Representa el tipo de datos C :c:type:`PyObject *`. Llamar esto sin un " +"Representa el tipo de datos C :c:type:`PyObject *`. Llamar esto sin un " "argumento crea un puntero ``NULL`` :c:type:`PyObject *`." #: ../Doc/library/ctypes.rst:2363 @@ -3372,10 +3384,10 @@ msgid "" "`DWORD`. Some useful structures like :c:type:`MSG` or :c:type:`RECT` are " "also defined." msgstr "" -"El módulo :mod:`ctypes.wintypes` proporciona otros tipos de datos específicos " -"de Windows, por ejemplo :c:type:`HWND`, :c:type:`WPARAM`, o :c:type:`DWORD`. " -"Algunas estructuras útiles como :c:type:`MSG` o :c:type:`RECT` también están " -"definidas." +"El módulo :mod:`ctypes.wintypes` proporciona otros tipos de datos " +"específicos de Windows, por ejemplo :c:type:`HWND`, :c:type:`WPARAM`, o :c:" +"type:`DWORD`. Algunas estructuras útiles como :c:type:`MSG` o :c:type:`RECT` " +"también están definidas." #: ../Doc/library/ctypes.rst:2371 msgid "Structured data types" @@ -3414,10 +3426,10 @@ msgid "" "`ctypes` will create :term:`descriptor`\\s which allow reading and writing " "the fields by direct attribute accesses. These are the" msgstr "" -"La estructura concreta y los tipos de unión deben crearse subclasificando uno " -"de estos tipos, y al menos definir una variable de clase :attr:`_fields_`. :" -"mod:`ctypes` creará :term:`descriptor`\\s que permitan leer y escribir los " -"campos por accesos directos de atributos. Estos son los" +"La estructura concreta y los tipos de unión deben crearse subclasificando " +"uno de estos tipos, y al menos definir una variable de clase :attr:" +"`_fields_`. :mod:`ctypes` creará :term:`descriptor`\\s que permitan leer y " +"escribir los campos por accesos directos de atributos. Estos son los" #: ../Doc/library/ctypes.rst:2404 msgid "" @@ -3425,8 +3437,8 @@ msgid "" "tuples. The first item is the name of the field, the second item specifies " "the type of the field; it can be any ctypes data type." msgstr "" -"Una secuencia que define los campos de estructura. Los elementos deben ser " -"de 2 o 3 tuplas. El primer ítem es el nombre del campo, el segundo ítem " +"Una secuencia que define los campos de estructura. Los elementos deben ser " +"de 2 o 3 tuplas. El primer ítem es el nombre del campo, el segundo ítem " "especifica el tipo de campo; puede ser cualquier tipo de datos ctypes." #: ../Doc/library/ctypes.rst:2408 @@ -3436,7 +3448,7 @@ msgid "" "field." msgstr "" "Para los campos de tipo entero como :class:`c_int`, se puede dar un tercer " -"elemento opcional. Debe ser un pequeño entero positivo que defina el ancho " +"elemento opcional. Debe ser un pequeño entero positivo que defina el ancho " "de bit del campo." #: ../Doc/library/ctypes.rst:2412 @@ -3444,7 +3456,7 @@ msgid "" "Field names must be unique within one structure or union. This is not " "checked, only one field can be accessed when names are repeated." msgstr "" -"Los nombres de los campos deben ser únicos dentro de una estructura o unión. " +"Los nombres de los campos deben ser únicos dentro de una estructura o unión. " "Esto no se comprueba, sólo se puede acceder a un campo cuando los nombres se " "repiten." @@ -3460,14 +3472,14 @@ msgstr "" #: ../Doc/library/ctypes.rst:2425 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 "" -"Sin embargo, la variable de clase :attr:`_fields_` debe ser definida antes de " -"que el tipo sea usado por primera vez (se crea una instancia, se llama a :" -"func:`sizeof`, y así sucesivamente). Las asignaciones posteriores a la " +"Sin embargo, la variable de clase :attr:`_fields_` debe ser definida antes " +"de que el tipo sea usado por primera vez (se crea una instancia, se llama a :" +"func:`sizeof`, y así sucesivamente). Las asignaciones posteriores a la " "variable de clase :attr:`_fields_` lanzarán un AttributeError." #: ../Doc/library/ctypes.rst:2430 @@ -3487,17 +3499,17 @@ msgid "" msgstr "" "Un pequeño entero opcional que permite anular la alineación de los campos de " "estructura en la instancia. :attr:`_pack_` ya debe estar definido cuando se " -"asigna :attr:`__fields_`, de lo contrario no tendrá ningún efecto." +"asigna :attr:`_fields_`, de lo contrario no tendrá ningún efecto." #: ../Doc/library/ctypes.rst:2444 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 "" "Una secuencia opcional que enumera los nombres de los campos sin nombre " -"(anónimos). :attr:`_anonymous_` debe estar ya definida cuando se asigna :attr:" -"`_fields_`, de lo contrario no tendrá ningún efecto." +"(anónimos). :attr:`_anonymous_` debe estar ya definida cuando se asigna :" +"attr:`_fields_`, de lo contrario no tendrá ningún efecto." #: ../Doc/library/ctypes.rst:2448 msgid "" @@ -3519,13 +3531,13 @@ msgstr "Aquí hay un tipo de ejemplo (Windows)::" 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 "" -"La estructura \"TYPEDESC\" describe un tipo de datos COM, el campo ``vt`` " -"especifica cuál de los campos de unión es válido. Como el campo ``u`` está " +"La estructura ``TYPEDESC`` describe un tipo de datos COM, el campo ``vt`` " +"especifica cuál de los campos de unión es válido. Como el campo ``u`` está " "definido como campo anónimo, ahora es posible acceder a los miembros " "directamente desde la instancia TYPEDESC. ``td.lptdesc`` y ``td.u.lptdesc`` " "son equivalentes, pero el primero es más rápido ya que no necesita crear una " @@ -3539,7 +3551,7 @@ msgid "" "of the base class." msgstr "" "Es posible definir subclases de estructuras, que heredan los campos de la " -"clase base. Si la definición de la subclase tiene una variable :attr:" +"clase base. Si la definición de la subclase tiene una variable :attr:" "`_fields_` separada, los campos especificados en ella se añaden a los campos " "de la clase base." @@ -3553,12 +3565,12 @@ msgid "" "names not present in :attr:`_fields_`." msgstr "" "Los constructores de estructuras y uniones aceptan tanto argumentos " -"posicionales como de palabras clave. Los argumentos posicionales se usan " -"para inicializar los campos de los miembros en el mismo orden en que aparecen " -"en :attr:`_fields_`. Los argumentos de palabras clave en el constructor se " -"interpretan como asignaciones de atributos, por lo que inicializarán :attr:" -"`_fields_` con el mismo nombre, o crearán nuevos atributos para nombres no " -"presentes en :attr:`_fields_`." +"posicionales como de palabras clave. Los argumentos posicionales se usan " +"para inicializar los campos de los miembros en el mismo orden en que " +"aparecen en :attr:`_fields_`. Los argumentos de palabras clave en el " +"constructor se interpretan como asignaciones de atributos, por lo que " +"inicializarán :attr:`_fields_` con el mismo nombre, o crearán nuevos " +"atributos para nombres no presentes en :attr:`_fields_`." #: ../Doc/library/ctypes.rst:2494 msgid "Arrays and pointers" @@ -3566,22 +3578,22 @@ msgstr "Arreglos y punteros" #: ../Doc/library/ctypes.rst:2498 msgid "Abstract base class for arrays." -msgstr "Clase base abstracta para los arreglos." +msgstr "Clase base abstracta para arreglos." #: ../Doc/library/ctypes.rst:2500 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 "" "La forma recomendada de crear tipos de arreglos concretos es multiplicando " -"cualquier tipo de datos :mod:`ctypes` con un número entero positivo. " +"cualquier tipo de datos :mod:`ctypes` con un número entero positivo. " "Alternativamente, puedes subclasificar este tipo y definir las variables de " -"clase :attr:`_length_` y :attr:`_type_`. Los elementos del arreglo pueden ser " -"leídos y escritos usando subíndices estándar y accesos slice; para las " +"clase :attr:`_length_` y :attr:`_type_`. Los elementos del arreglo pueden " +"ser leídos y escritos usando subíndices estándar y accesos slice; para las " "lecturas slice, el objeto resultante *no es* en sí mismo un :class:`Array`." #: ../Doc/library/ctypes.rst:2510 @@ -3590,9 +3602,9 @@ msgid "" "range subscripts result in an :exc:`IndexError`. Will be returned by :func:" "`len`." msgstr "" -"Un número entero positivo que especifica el número de elementos del conjunto. " -"Los subíndices fuera de rango dan como resultado un :exc:`IndexError`. Será " -"retornado por :func:`len`." +"Un número entero positivo que especifica el número de elementos del " +"conjunto. Los subíndices fuera de rango dan como resultado un :exc:" +"`IndexError`. Será retornado por :func:`len`." #: ../Doc/library/ctypes.rst:2517 msgid "Specifies the type of each element in the array." @@ -3608,7 +3620,7 @@ msgstr "" #: ../Doc/library/ctypes.rst:2526 msgid "Private, abstract base class for pointers." -msgstr "Clase de base privada y abstracta para los punteros." +msgstr "Clase base, privada y abstracta para punteros." #: ../Doc/library/ctypes.rst:2528 msgid "" @@ -3626,12 +3638,12 @@ msgid "" "the memory *before* the pointer (as in C), and out-of-range subscripts will " "probably crash with an access violation (if you're lucky)." msgstr "" -"Si un puntero apunta a un arreglo, sus elementos pueden ser leídos y escritos " -"usando accesos de subíndices y cortes estándar. Los objetos punteros no " -"tienen tamaño, así que :func:`len` lanzará un :exc:`TypeError`. Los " -"subíndices negativos se leerán de la memoria *antes* que el puntero (como en " -"C), y los subíndices fuera de rango probablemente se bloqueen con una " -"violación de acceso (si tienes suerte)." +"Si un puntero apunta a un arreglo, sus elementos pueden ser leídos y " +"escritos usando accesos de subíndices y cortes estándar. Los objetos " +"punteros no tienen tamaño, así que :func:`len` lanzará un :exc:`TypeError`. " +"Los subíndices negativos se leerán de la memoria *antes* que el puntero " +"(como en C), y los subíndices fuera de rango probablemente se bloqueen con " +"una violación de acceso (si tienes suerte)." #: ../Doc/library/ctypes.rst:2542 msgid "Specifies the type pointed to." @@ -3639,8 +3651,8 @@ msgstr "Especifica el tipo apuntado." #: ../Doc/library/ctypes.rst:2546 msgid "" -"Returns the object to which to pointer points. Assigning to this attribute " +"Returns the object to which to pointer points. Assigning to this attribute " "changes the pointer to point to the assigned object." msgstr "" -"Retorna el objeto al que apunta. Asignar a este atributo cambia el puntero " +"Retorna el objeto al que apunta. Asignar a este atributo cambia el puntero " "para que apunte al objeto asignado." From 2c6180db2ba458cec4efceb40762ac1522e3bcd6 Mon Sep 17 00:00:00 2001 From: Cristian Maureira-Fredes Date: Sat, 22 Aug 2020 15:59:11 +0200 Subject: [PATCH 33/34] Arreglando comillas en distintas palabras library/ctypes --- library/ctypes.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/ctypes.po b/library/ctypes.po index 73c1c6c593..b0707e94cc 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -2511,7 +2511,7 @@ msgstr "" #: ../Doc/library/ctypes.rst:1832 msgid "``byref(obj, offset)`` corresponds to this C code::" -msgstr "``byref(obj, offset)` corresponde a este código C::" +msgstr "``byref(obj, offset)`` corresponde a este código C::" #: ../Doc/library/ctypes.rst:1836 msgid "" From b86c066d4d0ea01e2e872e4b7fe87ee5add4fb15 Mon Sep 17 00:00:00 2001 From: Cristian Maureira-Fredes Date: Sat, 22 Aug 2020 17:24:00 +0200 Subject: [PATCH 34/34] Agregar nuevas palabras library/ctypes --- dictionaries/library_ctypes.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dictionaries/library_ctypes.txt b/dictionaries/library_ctypes.txt index 00433856cd..550be81f49 100644 --- a/dictionaries/library_ctypes.txt +++ b/dictionaries/library_ctypes.txt @@ -19,3 +19,5 @@ DllCanUnloadNow DllGetClassObject redimensiona subclasificando +inicializadas +inicializarán