diff --git a/TRANSLATORS b/TRANSLATORS index 27647c7cb2..3097005355 100644 --- a/TRANSLATORS +++ b/TRANSLATORS @@ -13,6 +13,7 @@ José Luis Cantilo (@jcantilo) Héctor Canto (@hectorcanto) Carlos Crespo (@cacrespo) Leandro E. Colombo Viña (@lecovi) +Douglas I Cueva Jr (@itisDouglas) Raúl Cumplido (@raulcd) Fabrizio Damicelli (@fabridamicelli) Javier Daza (@javierdaza) diff --git a/dictionaries/library_io.txt b/dictionaries/library_io.txt new file mode 100644 index 0000000000..b9ae1efc40 --- /dev/null +++ b/dictionaries/library_io.txt @@ -0,0 +1,6 @@ +grabable +ineficiencia +subclasifica +Reconfigura +preprocesamiento +similarmente diff --git a/library/io.po b/library/io.po index 12dd4e1fd7..2c66dcd2e4 100644 --- a/library/io.po +++ b/library/io.po @@ -6,31 +6,32 @@ # 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-07-27 18:51-0400\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: Douglas Cueva \n" +"Language: io\n" +"X-Generator: Poedit 2.3.1\n" #: ../Doc/library/io.rst:2 msgid ":mod:`io` --- Core tools for working with streams" -msgstr "" +msgstr ":mod:`io` --- Herramientas principales para trabajar con *streams*" #: ../Doc/library/io.rst:15 msgid "**Source code:** :source:`Lib/io.py`" -msgstr "" +msgstr "**Código fuente:** :source:`Lib/io.py`" #: ../Doc/library/io.rst:22 msgid "Overview" -msgstr "" +msgstr "Resumen" #: ../Doc/library/io.rst:27 msgid "" @@ -41,6 +42,12 @@ msgid "" "any of these categories is called a :term:`file object`. Other common terms " "are *stream* and *file-like object*." msgstr "" +"El módulo :mod:`io` provee las facilidades principales de Python para " +"manejar diferentes tipos de E/S. Hay tres diferentes tipos de E/S: *texto E/" +"S*, *binario E/S* e *E/S sin formato*. Estas son categorías generales y " +"varios respaldos de almacenamiento se pueden usar para cada una de ellas. Un " +"objeto concreto perteneciendo a cualquiera de estas categorías se llama un :" +"term:`file object`. Otros términos comunes son *stream* y *file-like object*." #: ../Doc/library/io.rst:34 msgid "" @@ -50,6 +57,11 @@ msgid "" "location), or only sequential access (for example in the case of a socket or " "pipe)." msgstr "" +"Independiente de su categoría, cada objeto *stream* también tendrá varias " +"capacidades: puede ser solamente para lectura, solo escritura, or lectura y " +"escritura. También permite arbitrariamente acceso aleatorio (buscando " +"adelante o hacia atrás en cualquier lugar) o solamente acceso secuencial " +"(por ejemplo en el caso de un *socket* o *pipe*)." #: ../Doc/library/io.rst:40 msgid "" @@ -58,17 +70,23 @@ msgid "" "stream will raise a :exc:`TypeError`. So will giving a :class:`bytes` " "object to the ``write()`` method of a text stream." msgstr "" +"Todas los *streams* son cuidadosas del tipo de datos que se les provee. Por " +"ejemplo dando un objeto de clase :class:`str` al método ``write()`` de un " +"*stream* binaria lanzará un :exc:`TypeError`. También dándole un objeto de " +"tipo :class:`bytes` al método ``write()`` de un *stream* de tipo texto." #: ../Doc/library/io.rst:45 msgid "" "Operations that used to raise :exc:`IOError` now raise :exc:`OSError`, " "since :exc:`IOError` is now an alias of :exc:`OSError`." msgstr "" +"Operaciones que lanzarán un :exc:`IOError` ahora lanzan :exc:`OSError`, ya " +"que :exc:`IOError` es un alias de :exc:`OSError`." #: ../Doc/library/io.rst:51 ../Doc/library/io.rst:777 #: ../Doc/library/io.rst:1032 msgid "Text I/O" -msgstr "" +msgstr "E/S Texto" #: ../Doc/library/io.rst:53 msgid "" @@ -77,28 +95,41 @@ msgid "" "a file), encoding and decoding of data is made transparently as well as " "optional translation of platform-specific newline characters." msgstr "" +"E/S de tipo texto espera y produce objetos de clase :class:`str`. Esto " +"significa que cuando el respaldo de almacenamiento está compuesto de forma " +"nativa de *bytes* (como en el caso de un archivo), la codificación y " +"descodificación de datos está hecho de forma transparente tanto como " +"traducción opcional de caracteres de nueva línea específicos de la " +"plataforma." #: ../Doc/library/io.rst:58 msgid "" "The easiest way to create a text stream is with :meth:`open()`, optionally " "specifying an encoding::" msgstr "" +"La manera más fácil de crear un *stream* de tipo texto es con el método :" +"meth:`open()`, con la opción de especificar una codificación::" #: ../Doc/library/io.rst:63 msgid "" "In-memory text streams are also available as :class:`StringIO` objects::" msgstr "" +"*Streams* de texto en memoria también están disponibles como objetos de " +"tipo :class:`StringIO`::" #: ../Doc/library/io.rst:67 msgid "" "The text stream API is described in detail in the documentation of :class:" "`TextIOBase`." msgstr "" +"El *API* (interfaz de programación de aplicaciones) de *streams* tipo texto " +"está descrito con detalle en la documentación de :class:`TextIOBase`." #: ../Doc/library/io.rst:72 ../Doc/library/io.rst:1020 msgid "Binary I/O" -msgstr "" +msgstr "E/S Binaria" +# I'm not sure if I have to translate the link #: ../Doc/library/io.rst:74 msgid "" "Binary I/O (also called *buffered I/O*) expects :term:`bytes-like objects " @@ -107,33 +138,47 @@ msgid "" "be used for all kinds of non-text data, and also when manual control over " "the handling of text data is desired." msgstr "" +"E/S binaria (también conocido como *buffered E/S*) espera :term:`objetos " +"tipo bytes` y produce objetos tipo :class:`bytes`. No se " +"hace codificación, descodificación, o traducciones de nueva línea. Esta " +"categoría de *streams* puede ser usada para todos tipos de datos sin texto, " +"y también cuando se desea control manual sobre el manejo de dato textual." #: ../Doc/library/io.rst:80 msgid "" "The easiest way to create a binary stream is with :meth:`open()` with " "``'b'`` in the mode string::" msgstr "" +"La manera más fácil para crear un *stream* binario es con el método :meth:" +"`open()` con ``'b'`` en el modo de la cadena de caracteres::" #: ../Doc/library/io.rst:85 msgid "" "In-memory binary streams are also available as :class:`BytesIO` objects::" msgstr "" +"Los *streams* binarios en memoria también están disponibles como objetos " +"tipo :class:`BytesIO`::" #: ../Doc/library/io.rst:89 msgid "" "The binary stream API is described in detail in the docs of :class:" "`BufferedIOBase`." msgstr "" +"El *API* de *stream* binario está descrito con detalle en la documentación " +"de :class:`BufferedIOBase`." #: ../Doc/library/io.rst:92 msgid "" "Other library modules may provide additional ways to create text or binary " "streams. See :meth:`socket.socket.makefile` for example." msgstr "" +"Otros módulos bibliotecarios pueden proveer maneras alternativas para crear " +"*streams* de tipo texto o binario. Ver :meth:`socket.socket.makefile` como " +"ejemplo." #: ../Doc/library/io.rst:97 msgid "Raw I/O" -msgstr "" +msgstr "E/S sin formato" #: ../Doc/library/io.rst:99 msgid "" @@ -142,15 +187,22 @@ msgid "" "manipulate a raw stream from user code. Nevertheless, you can create a raw " "stream by opening a file in binary mode with buffering disabled::" msgstr "" +"E/S sin formato (también conocido como *unbuffered E/S*) es generalmente " +"usado como un fundamento de nivel bajo para *streams* binario y tipo texto; " +"es raramente útil para manipular directamente *streams* sin formatos del " +"código de usuario. Sin embargo puedes crear un *stream* sin formato abriendo " +"un archivo en modo binario con el búfer apagado::" #: ../Doc/library/io.rst:106 msgid "" "The raw stream API is described in detail in the docs of :class:`RawIOBase`." msgstr "" +"El *API* de *streams* sin formato está descrito con detalle en la " +"documentación de :class:`RawIOBase`." #: ../Doc/library/io.rst:110 msgid "High-level Module Interface" -msgstr "" +msgstr "Interfaz de módulo de alto nivel" #: ../Doc/library/io.rst:114 msgid "" @@ -158,15 +210,20 @@ msgid "" "classes. :func:`open` uses the file's blksize (as obtained by :func:`os." "stat`) if possible." msgstr "" +"Un *int* que contiene el búfer de tamaño predeterminado usado por las clases " +"de tipo E/S. :func:`open` utiliza el *blksize* del archivo (obtenido por :" +"func:`os.stat`) si es posible." #: ../Doc/library/io.rst:121 msgid "This is an alias for the builtin :func:`open` function." -msgstr "" +msgstr "Esto es un alias para la función incorporada :func:`open`." msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``path``, " "``mode``, ``flags``." msgstr "" +"Lanza un :ref:`auditing event ` ``open`` con los " +"argumentos``path``, ``mode``, ``flags``." #: ../Doc/library/io.rst:125 msgid "" @@ -174,16 +231,21 @@ msgid "" "arguments ``path``, ``mode`` and ``flags``. The ``mode`` and ``flags`` " "arguments may have been modified or inferred from the original call." msgstr "" +"Esta función lanza un ref:`auditing event ` ``open`` con los " +"argumentos ``path``, ``mode`` y ``flags``. Los argumentos``mode`` y " +"``flags`` pueden haber sido modificados o inferido desde el pedido original." #: ../Doc/library/io.rst:132 msgid "" "Opens the provided file with mode ``'rb'``. This function should be used " "when the intent is to treat the contents as executable code." msgstr "" +"Abre el archivo dado con el modo ``'rb'``. Esta función debe ser usado " +"cuando la intención es tratar el contenido como código ejecutible." #: ../Doc/library/io.rst:135 msgid "``path`` should be a :class:`str` and an absolute path." -msgstr "" +msgstr "``path`` debe ser un :class:`str` y una ruta absoluta." #: ../Doc/library/io.rst:137 msgid "" @@ -193,22 +255,32 @@ msgid "" "same as ``open(path, 'rb')``. Overriding the behavior is intended for " "additional validation or preprocessing of the file." msgstr "" +"Se puede anular el comportamiento de esta función haciendo un pedido " +"anterior a :c:func:`PyFile_SetOpenCodeHook`. Sin embargo, asumiendo que " +"``path`` es un :class:`str` y una ruta absoluta, ``open_code(path)`` debería " +"manejarse al igual que ``open(path, ‘rb')``. El propósito de anular el " +"comportamiento existe para validación adicional o para el preprocesamiento " +"del archivo." #: ../Doc/library/io.rst:148 msgid "" "This is a compatibility alias for the builtin :exc:`BlockingIOError` " "exception." msgstr "" +"Esto es un alias de compatibilidad para la incorporada excepción :exc:" +"`BlockingIOError`." #: ../Doc/library/io.rst:154 msgid "" "An exception inheriting :exc:`OSError` and :exc:`ValueError` that is raised " "when an unsupported operation is called on a stream." msgstr "" +"Una excepción heredando :exc:`OSError` y :exc:`ValueError` que es generado " +"cuando se llama a una operación no admitida en un *stream*." #: ../Doc/library/io.rst:159 msgid "In-memory streams" -msgstr "" +msgstr "*Streams* en memoria" #: ../Doc/library/io.rst:161 msgid "" @@ -218,20 +290,27 @@ msgid "" "file opened in binary mode. Both provide full read-write capabilities with " "random access." msgstr "" +"Es posible usar un :class:`str` o :term:`bytes-like object` como un archivo " +"para lectura y escritura. Para cadena de caracteres :class:`StringIO` pueden " +"ser usados como un archivo abierto en modo texto. :class:`BytesIO` puede ser " +"usado como un archivo abierto in modo binario. Ambos proveen completa " +"capacidad para lectura y escritura con acceso aleatorio." #: ../Doc/library/io.rst:171 msgid ":mod:`sys`" -msgstr "" +msgstr ":mod:`sys`" #: ../Doc/library/io.rst:171 msgid "" "contains the standard IO streams: :data:`sys.stdin`, :data:`sys.stdout`, " "and :data:`sys.stderr`." msgstr "" +"contiene los *streams* estándar de IO :data:`sys.stdin`, :data:`sys.stdout`, " +"y :data:`sys.stderr`." #: ../Doc/library/io.rst:176 msgid "Class hierarchy" -msgstr "" +msgstr "Jerarquía de clases" #: ../Doc/library/io.rst:178 msgid "" @@ -240,6 +319,10 @@ msgid "" "used to specify the various categories of streams, then concrete classes " "providing the standard stream implementations." msgstr "" +"La implementación de *streams* E/S está organizada como una jerarquía de " +"clases. Primero :term:`abstract base classes ` (ABC), " +"que son usados para especificar las varias categorías de *streams*, luego " +"las clases concretas proveen un *stream* estándar de implementaciones." #: ../Doc/library/io.rst:185 msgid "" @@ -248,6 +331,10 @@ msgid "" "example, :class:`BufferedIOBase` provides unoptimized implementations of :" "meth:`~IOBase.readinto` and :meth:`~IOBase.readline`." msgstr "" +"Las clases abstractas base también proveen implementaciones predeterminadas " +"de algunos métodos para ayudar implementar clases de *streams* concretos. " +"Por ejemplo, :class:`BufferedIOBase` proporciona implementaciones no " +"optimizadas de :meth:`~IOBase.readinto` y :meth:`~IOBase.readline`." #: ../Doc/library/io.rst:190 msgid "" @@ -257,6 +344,10 @@ msgid "" "allowed to raise :exc:`UnsupportedOperation` if they do not support a given " "operation." msgstr "" +"En la parte superior de la jerarquía E/S está la clase abstracta base :class:" +"`IOBase`. Define la interfaz básica del *stream*. Tenga en cuenta que no hay " +"separación entre *streams* de lectura y escritura; implementaciones están " +"permitidos lanzar :exc:`UnsupportedOperation` si no apoyan la operación." #: ../Doc/library/io.rst:195 msgid "" @@ -264,6 +355,10 @@ msgid "" "reading and writing of bytes to a stream. :class:`FileIO` subclasses :class:" "`RawIOBase` to provide an interface to files in the machine's file system." msgstr "" +"La clase :class:`RawIOBase` extiende :class:`IOBase`. Maneja la lectura y " +"escritura de bytes a un *stream*. :class:`FileIO` subclasifica :class:" +"`RawIOBase` para proveer una interfaz a los archivos en el sistema de " +"archivos de la máquina." #: ../Doc/library/io.rst:199 msgid "" @@ -274,6 +369,13 @@ msgid "" "provides a buffered interface to random access streams. Another :class:" "`BufferedIOBase` subclass, :class:`BytesIO`, is a stream of in-memory bytes." msgstr "" +"La :class:`BufferedIOBase` ABC maneja el búfer en un *stream* de *bytes* sin " +"formato (:class:`RawIOBase`). Sus subclasificaciones, :class:" +"`BufferedWriter`, :class:`BufferedReader`, y :class:`BufferedRWPair` " +"*streams* de búfer que son legible, grabable, y ambos legible y grabable. :" +"class:`BufferedRandom` provee un interfaz búfer a *streams* de acceso " +"aleatorio. Otra subclasificación :class:`BufferedIOBase`, :class:`BytesIO`, " +"es un *stream* de *bytes* en memoria." #: ../Doc/library/io.rst:207 msgid "" @@ -283,42 +385,53 @@ msgid "" "interface to a buffered raw stream (:class:`BufferedIOBase`). Finally, :" "class:`StringIO` is an in-memory stream for text." msgstr "" +"El :class:`TextIOBase` ABC, otra subclasificación de :class:`IOBase`, trata " +"con los *streams* cuyos *bytes* representan texto, y maneja la codificación " +"y descodificación para cadenas de caracteres y de estos mismos. :class:" +"`TextIOWrapper`, que extiende a este, es un interfaz textual almacenado un " +"*stream* sin formato amortiguado (:class:`BufferedIOBase`). Finalmente, :" +"class:`StringIO` es una *stream* en memoria para texto." #: ../Doc/library/io.rst:213 msgid "" "Argument names are not part of the specification, and only the arguments of :" "func:`open` are intended to be used as keyword arguments." msgstr "" +"Los nombres de los argumentos no son parte de la especificación, y solo los " +"argumentos de :func:`open` están destinados a ser utilizados como argumentos " +"de palabras clave." #: ../Doc/library/io.rst:216 msgid "" "The following table summarizes the ABCs provided by the :mod:`io` module:" msgstr "" +"La siguiente tabla resume los ABC proporcionado por el módulo :mod:`io` " +"module:" #: ../Doc/library/io.rst:221 msgid "ABC" -msgstr "" +msgstr "ABC" #: ../Doc/library/io.rst:221 msgid "Inherits" -msgstr "" +msgstr "Hereda" #: ../Doc/library/io.rst:221 msgid "Stub Methods" -msgstr "" +msgstr "Métodos de trozos (*Stub*)" #: ../Doc/library/io.rst:221 msgid "Mixin Methods and Properties" -msgstr "" +msgstr "Métodos Mixin y propiedades" #: ../Doc/library/io.rst:223 ../Doc/library/io.rst:228 #: ../Doc/library/io.rst:230 ../Doc/library/io.rst:232 msgid ":class:`IOBase`" -msgstr "" +msgstr ":class:`IOBase`" #: ../Doc/library/io.rst:223 msgid "``fileno``, ``seek``, and ``truncate``" -msgstr "" +msgstr "``fileno``, ``seek``, and ``truncate``" #: ../Doc/library/io.rst:223 msgid "" @@ -326,53 +439,59 @@ msgid "" "``__iter__``, ``__next__``, ``readable``, ``readline``, ``readlines``, " "``seekable``, ``tell``, ``writable``, and ``writelines``" msgstr "" +"``close``, ``closed``, ``__enter__``, ``__exit__``, ``flush``, ``isatty``, " +"``__iter__``, ``__next__``, ``readable``, ``readline``, ``readlines``, " +"``seekable``, ``tell``, ``writable``, and ``writelines``" #: ../Doc/library/io.rst:228 msgid ":class:`RawIOBase`" -msgstr "" +msgstr ":class:`RawIOBase`" #: ../Doc/library/io.rst:228 msgid "``readinto`` and ``write``" -msgstr "" +msgstr "``readinto`` and ``write``" #: ../Doc/library/io.rst:228 msgid "Inherited :class:`IOBase` methods, ``read``, and ``readall``" -msgstr "" +msgstr "Heredada :class:`IOBase` methods, ``read``, and ``readall``" #: ../Doc/library/io.rst:230 msgid ":class:`BufferedIOBase`" -msgstr "" +msgstr ":class:`BufferedIOBase`" #: ../Doc/library/io.rst:230 msgid "``detach``, ``read``, ``read1``, and ``write``" -msgstr "" +msgstr "``detach``, ``read``, ``read1``, and ``write``" #: ../Doc/library/io.rst:230 msgid "Inherited :class:`IOBase` methods, ``readinto``, and ``readinto1``" -msgstr "" +msgstr "Heredada :class:`IOBase` methods, ``readinto``, and ``readinto1``" #: ../Doc/library/io.rst:232 msgid ":class:`TextIOBase`" -msgstr "" +msgstr ":class:`TextIOBase`" #: ../Doc/library/io.rst:232 msgid "``detach``, ``read``, ``readline``, and ``write``" -msgstr "" +msgstr "``detach``, ``read``, ``readline``, and ``write``" #: ../Doc/library/io.rst:232 msgid "" "Inherited :class:`IOBase` methods, ``encoding``, ``errors``, and ``newlines``" msgstr "" +"Heredada :class:`IOBase` methods, ``encoding``, ``errors``, and ``newlines``" #: ../Doc/library/io.rst:239 msgid "I/O Base Classes" -msgstr "" +msgstr "Clases base E/S" #: ../Doc/library/io.rst:243 msgid "" "The abstract base class for all I/O classes, acting on streams of bytes. " "There is no public constructor." msgstr "" +"La clase base abstracta para todas las clases de tipo E/S, actuando sobre " +"*streams* de *bytes*. No hay constructor público." #: ../Doc/library/io.rst:246 msgid "" @@ -380,6 +499,10 @@ msgid "" "derived classes can override selectively; the default implementations " "represent a file that cannot be read, written or seeked." msgstr "" +"Esta clase provee implementaciones abstractas vacías para muchos métodos que " +"clases que derivadas pueden anular selectivamente; la implementación " +"predeterminada representa un archivo que no se puede leer, grabar o ser " +"buscado." #: ../Doc/library/io.rst:251 msgid "" @@ -389,6 +512,11 @@ msgid "" "raise a :exc:`ValueError` (or :exc:`UnsupportedOperation`) when operations " "they do not support are called." msgstr "" +"Aunque :class:`IOBase` no declara el método :meth:`read` o :meth:`write` " +"porque sus firmas varían, implementaciones y clientes deberían considerar " +"usar métodos como parte de la interfaz. Las implementaciones también podrían " +"lanzar un :exc:`ValueError` (o :exc:`UnsupportedOperation`) cuando " +"operaciones que estos no apoyan son usados." #: ../Doc/library/io.rst:257 msgid "" @@ -396,12 +524,19 @@ msgid "" "`bytes`. Other :term:`bytes-like objects ` are accepted " "as method arguments too. Text I/O classes work with :class:`str` data." msgstr "" +"El tipo básico usado para leer datos binarios o grabar un archivo es :class:" +"`bytes`. Otros :term:`bytes-like objects ` son aceptados " +"como argumentos para métodos también. Clases de tipo E/S funcionan usando " +"datos de tipo :class:`str`." #: ../Doc/library/io.rst:261 msgid "" "Note that calling any method (even inquiries) on a closed stream is " "undefined. Implementations may raise :exc:`ValueError` in this case." msgstr "" +"Tenga en cuenta que llamando cualquier método (incluso indagaciones) en un " +"*stream* cerrada es indefinido. En este caso implementaciones podrían lanzar " +"un error :exc:`ValueError`." #: ../Doc/library/io.rst:264 msgid "" @@ -411,6 +546,12 @@ msgid "" "stream is a binary stream (yielding bytes), or a text stream (yielding " "character strings). See :meth:`~IOBase.readline` below." msgstr "" +":class:`IOBase` (y sus subcalsificaciones) apoyan el protocolo iterador, " +"significando que un objeto de clase :class:`IOBase` puede ser iterado sobre " +"el rendimiento de las líneas en un *stream* de datos. Líneas son definidas " +"un poco diferente dependiendo si el *stream* es de tipo binario (produciendo " +"*bytes*), o un *stream* de texto (produciendo cadenas de caracteres). Ver :" +"meth:`~IOBase.readline` abajo." #: ../Doc/library/io.rst:270 msgid "" @@ -418,10 +559,14 @@ msgid "" "keyword:`with` statement. In this example, *file* is closed after the :" "keyword:`!with` statement's suite is finished---even if an exception occurs::" msgstr "" +":class:`IOBase` es también un gestor de contexto y por ende apoya la " +"declaración :keyword:`with`. En este ejemplo, *file* es cerrado después de " +"que la declaración :keyword:`!with` termina--incluso si alguna excepción " +"ocurre::" #: ../Doc/library/io.rst:277 msgid ":class:`IOBase` provides these data attributes and methods:" -msgstr "" +msgstr ":class:`IOBase` provee los siguientes atributos y métodos:" #: ../Doc/library/io.rst:281 msgid "" @@ -429,16 +574,21 @@ msgid "" "already closed. Once the file is closed, any operation on the file (e.g. " "reading or writing) will raise a :exc:`ValueError`." msgstr "" +"Cierra el *stream*. Este método no tiene efecto si el archivo ya está " +"cerrado. Cuándo está cerrado, cualquier operación que se le haga al archivo " +"(ej. leer or grabar) lanzará el error :exc:`ValueError`." #: ../Doc/library/io.rst:285 msgid "" "As a convenience, it is allowed to call this method more than once; only the " "first call, however, will have an effect." msgstr "" +"Como convenienca, se permite llamar este método más que una vez. Sin " +"embargo, solamente el primer llamado tenderá efecto." #: ../Doc/library/io.rst:290 msgid "``True`` if the stream is closed." -msgstr "" +msgstr "``True`` si está cerrada el *stream*." #: ../Doc/library/io.rst:294 msgid "" @@ -446,30 +596,41 @@ msgid "" "exists. An :exc:`OSError` is raised if the IO object does not use a file " "descriptor." msgstr "" +"Retorna el descriptor de archivo subyacente (un número de tipo entero) de el " +"*stream* si existe. Un :exc:`OSError` se lanza si el objeto IO no tiene un " +"archivo descriptor." #: ../Doc/library/io.rst:300 msgid "" "Flush the write buffers of the stream if applicable. This does nothing for " "read-only and non-blocking streams." msgstr "" +"Vacía los buffers de grabación del *stream* si corresponde. Esto no hace " +"nada para *streams* que son solamente de lectura o *streams* sin bloqueo." #: ../Doc/library/io.rst:305 msgid "" "Return ``True`` if the stream is interactive (i.e., connected to a terminal/" "tty device)." msgstr "" +"Retorna ``True`` si el *stream* es interactiva (ej., si está conectado a un " +"terminal o dispositivo tty)." #: ../Doc/library/io.rst:310 msgid "" "Return ``True`` if the stream can be read from. If ``False``, :meth:`read` " "will raise :exc:`OSError`." msgstr "" +"Retorna ``True`` si el *stream* puede ser leída. Si es ``False``, el método :" +"meth:`read` lanzará un :exc:`OSError`." #: ../Doc/library/io.rst:315 msgid "" "Read and return one line from the stream. If *size* is specified, at most " "*size* bytes will be read." msgstr "" +"Lee y retorna una línea del *stream*. Si *size* (tamaño) es especificado, se " +"capturará un máximo de ése mismo tamaño especificado en *bytes*." #: ../Doc/library/io.rst:318 msgid "" @@ -477,6 +638,10 @@ msgid "" "the *newline* argument to :func:`open` can be used to select the line " "terminator(s) recognized." msgstr "" +"El terminador de la línea siempre es ``b'\\n'`` para archivos de tipo " +"binario; para archivos de tipo texto el argumento *newline* para la función :" +"func:`open` pueden ser usados para seleccionar las líneas terminadoras " +"reconocidas." #: ../Doc/library/io.rst:324 msgid "" @@ -484,12 +649,18 @@ msgid "" "control the number of lines read: no more lines will be read if the total " "size (in bytes/characters) of all lines so far exceeds *hint*." msgstr "" +"Lee y retorna una lista de líneas del *stream*. *hint* puede ser " +"especificado para controlar el número de líneas que se lee: no se leerán más " +"líneas si el tamaño total (en *bytes* / caracteres) de todas las líneas " +"excede *hint*." #: ../Doc/library/io.rst:328 msgid "" "Note that it's already possible to iterate on file objects using ``for line " "in file: ...`` without calling ``file.readlines()``." msgstr "" +"Tenga en cuenta que ya es posible iterar sobre objetos de archivo usando " +"``for line in file: …`` sin llamar ``file.readlines()``." #: ../Doc/library/io.rst:333 msgid "" @@ -497,31 +668,39 @@ msgid "" "interpreted relative to the position indicated by *whence*. The default " "value for *whence* is :data:`SEEK_SET`. Values for *whence* are:" msgstr "" +"Cambiar la posición del *stream* al dado *byte* *offset*. *offset* se " +"interpreta en relación con la posición indicada por *whence*. El valor dado " +"para *whence* es :data:`SEEK_SET`. Valores para *whence* son:" #: ../Doc/library/io.rst:337 msgid "" ":data:`SEEK_SET` or ``0`` -- start of the stream (the default); *offset* " "should be zero or positive" msgstr "" +":data:`SEEK_SET` o ``0`` -- inicio del *stream* (el dado); *offset* debería " +"ser cero o positivo" #: ../Doc/library/io.rst:339 msgid "" ":data:`SEEK_CUR` or ``1`` -- current stream position; *offset* may be " "negative" msgstr "" +":data:`SEEK_CUR` o ``1`` -- posición actual del *stream*; *offset* puede ser " +"negativo" #: ../Doc/library/io.rst:341 msgid "" ":data:`SEEK_END` or ``2`` -- end of the stream; *offset* is usually negative" msgstr "" +":data:`SEEK_END` o ``2`` -- fin del *stream*; *offset* is usualmente negativo" #: ../Doc/library/io.rst:344 msgid "Return the new absolute position." -msgstr "" +msgstr "Retorna la nueva posición absoluta." #: ../Doc/library/io.rst:346 ../Doc/library/io.rst:853 msgid "The ``SEEK_*`` constants." -msgstr "" +msgstr "Los constantes``SEEK_*``." #: ../Doc/library/io.rst:349 msgid "" @@ -529,16 +708,22 @@ msgid "" "SEEK_HOLE` or :data:`os.SEEK_DATA`. The valid values for a file could depend " "on it being open in text or binary mode." msgstr "" +"Algunos sistemas operativos pueden apoyar valores adicionales, como :data:" +"`os.SEEK_HOLE` o :data:`os.SEEK_DATA`. Los valores válidos para un archivo " +"podrían depender de que esté abierto en modo texto o binario." #: ../Doc/library/io.rst:356 msgid "" "Return ``True`` if the stream supports random access. If ``False``, :meth:" "`seek`, :meth:`tell` and :meth:`truncate` will raise :exc:`OSError`." msgstr "" +"Retorna ``True`` si el *stream* apoya acceso aleatorio. Si retorna " +"``False``, :meth:`seek`, :meth:`tell` y :meth:`truncate` lanzarán :exc:" +"`OSError`." #: ../Doc/library/io.rst:361 msgid "Return the current stream position." -msgstr "" +msgstr "Retorna la posición actual del *stream*." #: ../Doc/library/io.rst:365 msgid "" @@ -548,22 +733,32 @@ msgid "" "the contents of the new file area depend on the platform (on most systems, " "additional bytes are zero-filled). The new file size is returned." msgstr "" +"Cambia el tamaño del *stream* al *size* dado en *bytes* (o la posición " +"actual si no se especifica *size*). La posición actual del *stream* no se " +"cambia. Este cambio de tamaño puede incrementar o reducir el tamaño actual " +"del archivo. En caso de extensión, los contenidos del área del nuevo archivo " +"depende de la plataforma (en la mayoría de los sistemas *bytes* adicionales " +"son llenos de cero). Se retorna el nuevo tamaño del archivo." #: ../Doc/library/io.rst:372 msgid "Windows will now zero-fill files when extending." -msgstr "" +msgstr "*Windows* llenará los archivos con cero cuando extienda." #: ../Doc/library/io.rst:377 msgid "" "Return ``True`` if the stream supports writing. If ``False``, :meth:`write` " "and :meth:`truncate` will raise :exc:`OSError`." msgstr "" +"Retorna ``True`` si el *stream* apoya grabación. Si retorna ``False``, :" +"meth:`write` y :meth:`truncate` lanzarán :exc:`OSError`." #: ../Doc/library/io.rst:382 msgid "" "Write a list of lines to the stream. Line separators are not added, so it " "is usual for each of the lines provided to have a line separator at the end." msgstr "" +"Escribir una lista de líneas al *stream*. No se agrega separadores de " +"líneas, así que es usual que las líneas tengan separador al final." #: ../Doc/library/io.rst:388 msgid "" @@ -571,12 +766,17 @@ msgid "" "implementation of this method that calls the instance's :meth:`~IOBase." "close` method." msgstr "" +"Prepara para la destrucción de un objeto. :class:`IOBase` proporciona una " +"implementación dada de este método que ejecuta las instancias del método :" +"meth:`~IOBase.close`." #: ../Doc/library/io.rst:395 msgid "" "Base class for raw binary I/O. It inherits :class:`IOBase`. There is no " "public constructor." msgstr "" +"Clase base para binarios de tipo E/S sin formato. Hereda la clase :class:" +"`IOBase`. No hay constructor público." #: ../Doc/library/io.rst:398 msgid "" @@ -584,12 +784,18 @@ msgid "" "device or API, and does not try to encapsulate it in high-level primitives " "(this is left to Buffered I/O and Text I/O, described later in this page)." msgstr "" +"E/S binario sin formato proporciona acceso de nivel bajo a algún dispositivo " +"del sistema operativo o API, y no intenta de encapsular primitivos de alto " +"nivel (esta función se le deja a E/S de tipo búfer y E/S de tipo texto; esto " +"se describe más adelante)." #: ../Doc/library/io.rst:402 msgid "" "In addition to the attributes and methods from :class:`IOBase`, :class:" "`RawIOBase` provides the following methods:" msgstr "" +"Además de los atributos y métodos de :class:`IOBase`, la clase :class:" +"`RawIOBase` proporciona los siguientes métodos:" #: ../Doc/library/io.rst:407 msgid "" @@ -598,6 +804,11 @@ msgid "" "only one system call is ever made. Fewer than *size* bytes may be returned " "if the operating system call returns fewer than *size* bytes." msgstr "" +"Lee hasta el *size* de los *bytes* del objeto y los retorna. Como " +"conveniencia si no se especifica *size* o es -1, se retornan todos los " +"*bytes* hasta que se retorne el fin del archivo. Sino, se hace solo un " +"llamado al sistema. Se pueden retornar menos de *size* *bytes* si la llamada " +"del sistema operativo retorna menos de *size* *bytes*." #: ../Doc/library/io.rst:412 msgid "" @@ -605,17 +816,23 @@ msgid "" "If the object is in non-blocking mode and no bytes are available, ``None`` " "is returned." msgstr "" +"Si se retorna 0 *bytes* y el *size* no era 0, esto indica que es el fin del " +"archivo. Si el objeto está en modo sin bloqueo y no hay *bytes* disponibles, " +"se retorna ``None``." #: ../Doc/library/io.rst:416 msgid "" "The default implementation defers to :meth:`readall` and :meth:`readinto`." msgstr "" +"La implementación dada difiera al método :meth:`readall` y :meth:`readinto`." #: ../Doc/library/io.rst:421 msgid "" "Read and return all the bytes from the stream until EOF, using multiple " "calls to the stream if necessary." msgstr "" +"Lee y retorna todos los *bytes* del *stream* hasta llegar al fin del " +"archivo, usando, si es necesario, varias llamadas al *stream*." #: ../Doc/library/io.rst:426 msgid "" @@ -624,6 +841,10 @@ msgid "" "`bytearray`. If the object is in non-blocking mode and no bytes are " "available, ``None`` is returned." msgstr "" +"Lee *bytes* en objeto pre-asignado y grabable :term:`bytes-like object` *b*, " +"y retorna el número de *bytes* leído. Por ejemplo, *b* puede ser una clase " +"de tipo :class:`bytearray`. Si el objeto está en modo sin bloquear y no hay " +"*bytes* disponibles, se retorna ``None``." #: ../Doc/library/io.rst:434 msgid "" @@ -635,12 +856,22 @@ msgid "" "to it. The caller may release or mutate *b* after this method returns, so " "the implementation should only access *b* during the method call." msgstr "" +"Escribe :term:`bytes-like object` dado, *b*, al *stream* subyacente y " +"retorna la cantidad de *bytes* grabadas. Esto puede ser menos que la " +"longitud de *b* en *bytes*, dependiendo de la especificaciones del *stream* " +"subyacente, especialmente si no está en modo no-bloqueo. ``None`` se retorna " +"si el *stream* sin formato está configurado para no bloquear y ningún *byte* " +"puede ser rápidamente grabada. El llamador puede deshacer o mutar *b* " +"después que retorne este método, así que la implementación solo debería " +"acceder *b* durante la ejecución al método." #: ../Doc/library/io.rst:447 msgid "" "Base class for binary streams that support some kind of buffering. It " "inherits :class:`IOBase`. There is no public constructor." msgstr "" +"Clase base para *streams* binarios que apoyan algún tipo de búfer. Hereda :" +"class:`IOBase`. No hay constructor público." #: ../Doc/library/io.rst:450 msgid "" @@ -649,6 +880,10 @@ msgid "" "input as requested or to consume all given output, at the expense of making " "perhaps more than one system call." msgstr "" +"La diferencia principal de :class:`RawIOBase` es que los métodos :meth:" +"`read`, :meth:`readinto` y :meth:`write` intentarán (respectivamente) leer " +"la cantidad de información solicitada o consumir toda la salida dada, a " +"expensas de hacer más de una llamada al sistema." #: ../Doc/library/io.rst:455 msgid "" @@ -657,12 +892,18 @@ msgid "" "data; unlike their :class:`RawIOBase` counterparts, they will never return " "``None``." msgstr "" +"Adicionalmente, esos métodos pueden lanzar un :exc:`BlockingIOError` si el " +"*stream* sin formato subyacente está en modo no bloqueo y no puede obtener " +"or dar más datos; a diferencia de sus contrapartes :class:`RawIOBase`, estos " +"nunca retornarán ``None``." #: ../Doc/library/io.rst:460 msgid "" "Besides, the :meth:`read` method does not have a default implementation that " "defers to :meth:`readinto`." msgstr "" +"Además, el método :meth:`read` no tiene una implementación dada que difiere " +"al método :meth:`readinto`." #: ../Doc/library/io.rst:463 msgid "" @@ -670,12 +911,17 @@ msgid "" "class:`RawIOBase` implementation, but wrap one, like :class:`BufferedWriter` " "and :class:`BufferedReader` do." msgstr "" +"Una implementación típica de :class:`BufferedIOBase` no debería heredar una " +"implementación de :class:`RawIOBase`, es más, debería envolver como uno, así " +"como hacen las clases :class:`BufferedWriter` y :class:`BufferedReader`." #: ../Doc/library/io.rst:467 msgid "" ":class:`BufferedIOBase` provides or overrides these methods and attribute in " "addition to those from :class:`IOBase`:" msgstr "" +":class:`BufferedIOBase` provee o anula estos métodos y atributos en adición " +"a los de :class:`IOBase`:" #: ../Doc/library/io.rst:472 msgid "" @@ -683,21 +929,29 @@ msgid "" "`BufferedIOBase` deals with. This is not part of the :class:" "`BufferedIOBase` API and may not exist on some implementations." msgstr "" +"El *stream* sin formato subyacente ( una instancia :class:`RawIOBase`) que :" +"class:`BufferedIOBase` maneja. Esto no es parte de la API :class:" +"`BufferedIOBase` y posiblemente no exista en algunas implementaciones." #: ../Doc/library/io.rst:478 msgid "Separate the underlying raw stream from the buffer and return it." -msgstr "" +msgstr "Separa el *stream* subyacente del búfer y lo retorna." #: ../Doc/library/io.rst:480 msgid "" "After the raw stream has been detached, the buffer is in an unusable state." msgstr "" +"Luego que el *stream* sin formato ha sido separado, el búfer está en un " +"estado inutilizable." #: ../Doc/library/io.rst:483 msgid "" "Some buffers, like :class:`BytesIO`, do not have the concept of a single raw " "stream to return from this method. They raise :exc:`UnsupportedOperation`." msgstr "" +"Algunos búfer, como :class:`BytesIO`, no tienen el concepto de un *stream* " +"sin formato singular para retornar de este método. Lanza un :exc:" +"`UnsupportedOperation`." #: ../Doc/library/io.rst:491 msgid "" @@ -705,6 +959,10 @@ msgid "" "or negative, data is read and returned until EOF is reached. An empty :" "class:`bytes` object is returned if the stream is already at EOF." msgstr "" +"Lee y retorna hasta *size* en *bytes*. Si el argumento está omitido, " +"``None``, o es negativo, los datos son leídos y retornados hasta que se " +"alcance el fin del archivo. Un objeto :class:`bytes` vacío se retorna si el " +"*stream* está al final del archivo." #: ../Doc/library/io.rst:495 msgid "" @@ -714,6 +972,12 @@ msgid "" "raw read will be issued, and a short result does not imply that EOF is " "imminent." msgstr "" +"Si el argumento es positivo, y el *stream* subyacente no es interactiva, " +"varias lecturas sin formato pueden ser otorgadas para satisfacer la cantidad " +"de *byte* (al menos que primero se llegue al fin del archivo). Pero para los " +"*streams* sin formato interactivas, a lo sumo una lectura sin formato será " +"emitida y un resultado corto no implica que se haya llegado al fin del " +"archivo." #: ../Doc/library/io.rst:501 ../Doc/library/io.rst:524 #: ../Doc/library/io.rst:534 @@ -721,6 +985,8 @@ msgid "" "A :exc:`BlockingIOError` is raised if the underlying raw stream is in non " "blocking-mode, and has no data available at the moment." msgstr "" +"Un :exc:`BlockingIOError` se lanza si el *stream* subyacente está en modo no " +"bloqueo y no tiene datos al momento." #: ../Doc/library/io.rst:506 msgid "" @@ -729,12 +995,18 @@ msgid "" "method. This can be useful if you are implementing your own buffering on " "top of a :class:`BufferedIOBase` object." msgstr "" +"Lee y retorna hasta *size* en *bytes* con al menos una llamada al método :" +"meth:`~RawIOBase.read` (o :meth:`~RawIOBase.readinto`) del *stream* " +"subyacente. Esto puede ser útil si estás implementando tu propio búfer por " +"encima de un objeto :class:`BufferedIOBase`." #: ../Doc/library/io.rst:512 msgid "" "If *size* is ``-1`` (the default), an arbitrary number of bytes are returned " "(more than zero unless EOF is reached)." msgstr "" +"Si *size* es ``-1`` (el valor dado) se retorna un monto arbitrario de " +"*bytes* (más que cero al menos que se haya llegado al fin del archivo)." #: ../Doc/library/io.rst:517 msgid "" @@ -742,12 +1014,17 @@ msgid "" "return the number of bytes read. For example, *b* might be a :class:" "`bytearray`." msgstr "" +"Lee *bytes* a un objeto predeterminado y grabable :term:`bytes-like object` " +"*b* y retorna el número de *bytes* leídos. Por ejemplo, *b* puede ser un :" +"class:`bytearray`." #: ../Doc/library/io.rst:521 msgid "" "Like :meth:`read`, multiple reads may be issued to the underlying raw " "stream, unless the latter is interactive." msgstr "" +"Como :meth:`read`, varias lecturas pueden ser otorgadas al *stream* sin " +"formato subyacente al menos que esto último sea interactivo." #: ../Doc/library/io.rst:529 msgid "" @@ -756,6 +1033,10 @@ msgid "" "read` (or :meth:`~RawIOBase.readinto`) method. Return the number of bytes " "read." msgstr "" +"Leer *bytes* a un objeto predeterminado y grabable :term:`bytes-like object` " +"*b* usando por lo menos una llamada al método :meth:`~RawIOBase.read` (o :" +"meth:`~RawIOBase.readinto`) del *stream* subyacente. Retorna la cantidad de " +"*bytes* leídas." #: ../Doc/library/io.rst:541 msgid "" @@ -765,6 +1046,12 @@ msgid "" "implementation, these bytes may be readily written to the underlying stream, " "or held in a buffer for performance and latency reasons." msgstr "" +"Escribe el :term:`bytes-like object` dado, *b*, y retorna el número de bytes " +"grabados (siempre el equivalente en longitud de *b* en bytes, ya que si " +"falla la grabación se lanza un :exc:`OSError`). Dependiendo en la " +"implementación actual estos bytes pueden ser grabados rápidamente al " +"*stream* subyacente o mantenido en un búfer por razones de rendimiento y " +"latencia." #: ../Doc/library/io.rst:548 msgid "" @@ -772,16 +1059,22 @@ msgid "" "needed to be written to the raw stream but it couldn't accept all the data " "without blocking." msgstr "" +"Cuando estás en modo no bloqueo, se lanza un :exc:`BlockingIOError` si los " +"datos tenían que ser grabadas al *stream* sin formato pero no pudo aceptar " +"todos los datos sin bloquear." #: ../Doc/library/io.rst:552 msgid "" "The caller may release or mutate *b* after this method returns, so the " "implementation should only access *b* during the method call." msgstr "" +"El llamador puede otorgar o mutar *b* después que este método retorne algo, " +"entonces la implementación debería acceder solamente a *b* durante la " +"llamada al método." #: ../Doc/library/io.rst:557 msgid "Raw File I/O" -msgstr "" +msgstr "Archivo sin formato E/S" #: ../Doc/library/io.rst:561 msgid "" @@ -789,10 +1082,13 @@ msgid "" "implements the :class:`RawIOBase` interface (and therefore the :class:" "`IOBase` interface, too)." msgstr "" +":class:`FileIO` representa un archivo de nivel OS conteniendo datos en " +"*bytes*. Implementa la interfaz :class:`RawIOBase` (y por ende también la " +"interfaz :class:`IOBase`)." #: ../Doc/library/io.rst:565 msgid "The *name* can be one of two things:" -msgstr "" +msgstr "El *name* puede ser una de dos cosas:" #: ../Doc/library/io.rst:567 msgid "" @@ -800,6 +1096,9 @@ msgid "" "file which will be opened. In this case closefd must be ``True`` (the " "default) otherwise an error will be raised." msgstr "" +"una cadena de caracteres u objeto de tipo :class:`bytes` representando la " +"ruta del archivo en la que fue abierto. En este caso *closefd* es ``True`` " +"(el valor dado) de otra manera un error será dada." #: ../Doc/library/io.rst:570 msgid "" @@ -808,6 +1107,10 @@ msgid "" "FileIO object is closed this fd will be closed as well, unless *closefd* is " "set to ``False``." msgstr "" +"un *integer* representando el número de descriptores de archivos de nivel OS " +"que resultan dando acceso a través del objeto :class:`FileIO`. Cuando el " +"objeto *FileIO* está cerrado este fd cerrará también a no ser que *closefd* " +"esté configurado a ``False``." #: ../Doc/library/io.rst:575 msgid "" @@ -819,12 +1122,21 @@ msgid "" "implies writing, so this mode behaves in a similar way to ``'w'``. Add a " "``'+'`` to the mode to allow simultaneous reading and writing." msgstr "" +"El *mode* puede ser ``'r'``, ``'w'``, ``'x'`` o``'a'`` para lectura (el " +"valor dado), grabación, creación exclusiva o anexando. Si no existe el " +"archivo se creará cuando se abra para grabar o anexar; se truncará cuando se " +"abra para grabar. Se lanzará un error :exc:`FileExistsError` si ya existe " +"cuando se abra para crear. Abriendo un archivo para crear implica grabar " +"entonces este modo se comporta similarmente a ``'w'``. Agrega un ``'+'`` al " +"modo para permitir lectura y grabación simultáneas." #: ../Doc/library/io.rst:583 msgid "" "The :meth:`read` (when called with a positive argument), :meth:`readinto` " "and :meth:`write` methods on this class will only make one system call." msgstr "" +"Los métodos :meth:`read` (cuando se llama con un argumento positivo), :meth:" +"`readinto` y :meth:`write` en esta clase harán solo una llamada al sistema." #: ../Doc/library/io.rst:586 msgid "" @@ -834,50 +1146,63 @@ msgid "" "descriptor (passing :mod:`os.open` as *opener* results in functionality " "similar to passing ``None``)." msgstr "" +"Un abridor personalizado puede ser usado pasando un llamador como *opener*. " +"El descriptor de archivo subyacente es obtenido llamando *opener* con " +"(*name*, *flags*). *opener* debe retornar un descriptor de archivo abierto " +"(pasando :mod:`os.open` como *opener* resulta con funcionamiento similar a " +"pasando ``None``)." #: ../Doc/library/io.rst:592 msgid "The newly created file is :ref:`non-inheritable `." -msgstr "" +msgstr "El archivo recién creado es :ref:`non-inheritable `." #: ../Doc/library/io.rst:594 msgid "" "See the :func:`open` built-in function for examples on using the *opener* " "parameter." msgstr "" +"Ver la función incorporada :func:`open` para ejemplos usando el parámetro " +"*opener*." #: ../Doc/library/io.rst:597 msgid "The *opener* parameter was added. The ``'x'`` mode was added." -msgstr "" +msgstr "El parámetro *opener* fue agregado. El modo ``'x'`` fue agregado." #: ../Doc/library/io.rst:601 msgid "The file is now non-inheritable." -msgstr "" +msgstr "El archivo ahora no es heredable." #: ../Doc/library/io.rst:604 msgid "" "In addition to the attributes and methods from :class:`IOBase` and :class:" "`RawIOBase`, :class:`FileIO` provides the following data attributes:" msgstr "" +"Además de los atributos y métodos de las clases :class:`IOBase` y :class:" +"`RawIOBase`, :class:`FileIO`, estos proveen los siguientes atributos:" #: ../Doc/library/io.rst:610 msgid "The mode as given in the constructor." -msgstr "" +msgstr "El modo dado en el constructor." #: ../Doc/library/io.rst:614 msgid "" "The file name. This is the file descriptor of the file when no name is " "given in the constructor." msgstr "" +"El nombre del archivo. Este es el descriptor del archivo cuando no se " +"proporciona ningún nombre en el constructor." #: ../Doc/library/io.rst:619 msgid "Buffered Streams" -msgstr "" +msgstr "*Streams* almacenados (búfer)" #: ../Doc/library/io.rst:621 msgid "" "Buffered I/O streams provide a higher-level interface to an I/O device than " "raw I/O does." msgstr "" +"*Streams* E/S almacenadas (búfer) proveen una interfaz de más alto nivel a " +"un dispositivo E/S que a un E/S sin formato." #: ../Doc/library/io.rst:626 msgid "" @@ -885,18 +1210,25 @@ msgid "" "`BufferedIOBase`. The buffer is discarded when the :meth:`~IOBase.close` " "method is called." msgstr "" +"Una implementación de *stream* usando búferes de *bytes* en memoria. Hereda :" +"class:`BufferedIOBase`. El búfer está descartado cuando se llama al método :" +"meth:`~IOBase.close`." #: ../Doc/library/io.rst:630 msgid "" "The optional argument *initial_bytes* is a :term:`bytes-like object` that " "contains initial data." msgstr "" +"El argumento opcional *initial_bytes* es un :term:`bytes-like object` que " +"contiene datos iniciales." #: ../Doc/library/io.rst:633 msgid "" ":class:`BytesIO` provides or overrides these methods in addition to those " "from :class:`BufferedIOBase` and :class:`IOBase`:" msgstr "" +":class:`BytesIO` provee o anula estos métodos además de los de :class:" +"`BufferedIOBase` y :class:`IOBase`:" #: ../Doc/library/io.rst:638 msgid "" @@ -904,29 +1236,38 @@ msgid "" "copying them. Also, mutating the view will transparently update the " "contents of the buffer::" msgstr "" +"Retorna una vista legible y grabable acerca de los contenidos del búfer sin " +"copiarlos. Además mutando la vista actualizará de forma transparente los " +"contenidos del búfer::" #: ../Doc/library/io.rst:649 msgid "" "As long as the view exists, the :class:`BytesIO` object cannot be resized or " "closed." msgstr "" +"Mientras exista la vista el objeto :class:`BytesIO` no se le puede cambiar " +"el tamaño o cerrado." #: ../Doc/library/io.rst:656 msgid "Return :class:`bytes` containing the entire contents of the buffer." -msgstr "" +msgstr "Retorna :class:`bytes` que contiene los contenidos enteros del búfer." #: ../Doc/library/io.rst:661 msgid "In :class:`BytesIO`, this is the same as :meth:`~BufferedIOBase.read`." msgstr "" +"En la clase :class:`BytesIO` esto es lo mismo que :meth:`~BufferedIOBase." +"read`." #: ../Doc/library/io.rst:663 ../Doc/library/io.rst:704 msgid "The *size* argument is now optional." -msgstr "" +msgstr "Ahora es opcional el argumento *size*." #: ../Doc/library/io.rst:668 msgid "" "In :class:`BytesIO`, this is the same as :meth:`~BufferedIOBase.readinto`." msgstr "" +"En la clase :class:`BytesIO` esto es lo mismo que :meth:`~BufferedIOBase." +"readinto`." #: ../Doc/library/io.rst:674 msgid "" @@ -936,6 +1277,12 @@ msgid "" "underlying raw stream, and kept in an internal buffer. The buffered data can " "then be returned directly on subsequent reads." msgstr "" +"Un búfer dando un nivel de alto acceso a un objeto :class:`RawIOBase` " +"legible y secuencial. Hereda :class:`BufferedIOBase`. Al leer datos de este " +"objeto se puede solicitar una mayor cantidad de datos del *stream* sin " +"formato subyacente, y mantener el búfer interno. Los datos que han pasado " +"por el proceso de búfer pueden ser retornados directamente en lecturas " +"posteriores." #: ../Doc/library/io.rst:680 msgid "" @@ -943,12 +1290,17 @@ msgid "" "*raw* stream and *buffer_size*. If *buffer_size* is omitted, :data:" "`DEFAULT_BUFFER_SIZE` is used." msgstr "" +"El constructor crea un :class:`BufferedReader` para el *stream* legible sin " +"formato *raw* y *buffer_size*. Si se omite *buffer_size* se usa :data:" +"`DEFAULT_BUFFER_SIZE`." #: ../Doc/library/io.rst:684 msgid "" ":class:`BufferedReader` provides or overrides these methods in addition to " "those from :class:`BufferedIOBase` and :class:`IOBase`:" msgstr "" +":class:`BufferedReader` provee o anula los métodos en adición a los de :" +"class:`BufferedIOBase` y :class:`IOBase`:" #: ../Doc/library/io.rst:689 msgid "" @@ -956,12 +1308,17 @@ msgid "" "single read on the raw stream is done to satisfy the call. The number of " "bytes returned may be less or more than requested." msgstr "" +"Retorna *bytes* del *stream* sin avanzar la posición. Al menos una lectura " +"se hace al *stream* sin formato para satisfacer el llamado. El número de " +"bytes retornados puede ser menor o mayor al solicitado." #: ../Doc/library/io.rst:695 msgid "" "Read and return *size* bytes, or if *size* is not given or negative, until " "EOF or if the read call would block in non-blocking mode." msgstr "" +"Lee y retorna *size* *bytes* o si no se da *size*, o es negativo, hasta el " +"fin del archivo o si la llamada leída podría bloquear in modo no bloquear." #: ../Doc/library/io.rst:700 msgid "" @@ -969,6 +1326,10 @@ msgid "" "at least one byte is buffered, only buffered bytes are returned. Otherwise, " "one raw stream read call is made." msgstr "" +"Lee y retorna hasta el tamaño *size* en *bytes* con solo un llamado al " +"*stream*. Si al menos un *byte* pasa por el proceso de búfer, solo se " +"retornan *buffered bytes*. De lo contrario se realiza un llamado de lectura " +"de un *stream* sin formato." #: ../Doc/library/io.rst:710 msgid "" @@ -978,23 +1339,31 @@ msgid "" "will be written out to the underlying :class:`RawIOBase` object under " "various conditions, including:" msgstr "" +"Un búfer que proporciona un nivel alto de acceso a un objeto :class:" +"`RawIOBase` grabable y secuencial. Hereda :class:`BufferedIOBase`. Al " +"escribir a este objeto, los datos normalmente se colocan en un búfer " +"interno. El búfer se escribirá en el objeto :class:`RawIOBase` subyacente " +"bajo varias condiciones, incluyendo:" #: ../Doc/library/io.rst:716 msgid "when the buffer gets too small for all pending data;" msgstr "" +"cuando el búfer se vuelve demasiado pequeño para todos los datos pendientes;" #: ../Doc/library/io.rst:717 msgid "when :meth:`flush()` is called;" -msgstr "" +msgstr "cuando se llama :meth:`flush()`;" #: ../Doc/library/io.rst:718 msgid "" "when a :meth:`seek()` is requested (for :class:`BufferedRandom` objects);" msgstr "" +"cuando se pide un método :meth:`seek()` (para :class:`BufferedRandom` " +"objects);" #: ../Doc/library/io.rst:719 msgid "when the :class:`BufferedWriter` object is closed or destroyed." -msgstr "" +msgstr "cuando el objeto :class:`BufferedWriter` is cerrado o anulado." #: ../Doc/library/io.rst:721 msgid "" @@ -1002,18 +1371,25 @@ msgid "" "*raw* stream. If the *buffer_size* is not given, it defaults to :data:" "`DEFAULT_BUFFER_SIZE`." msgstr "" +"El constructor crea un :class:`BufferedWriter` para el *stream* grabable " +"*raw*. Si no es dado el *buffer_size*, recurre el valor :data:" +"`DEFAULT_BUFFER_SIZE`." #: ../Doc/library/io.rst:725 msgid "" ":class:`BufferedWriter` provides or overrides these methods in addition to " "those from :class:`BufferedIOBase` and :class:`IOBase`:" msgstr "" +":class:`BufferedWriter` provee o anula estos métodos además de los de :class:" +"`BufferedIOBase` y :class:`IOBase`:" #: ../Doc/library/io.rst:730 msgid "" "Force bytes held in the buffer into the raw stream. A :exc:" "`BlockingIOError` should be raised if the raw stream blocks." msgstr "" +"Forzar bytes retenidos en el búfer al *stream* sin formato. Un :exc:" +"`BlockingIOError` debería ser lanzado si el *stream* sin formato bloquea." #: ../Doc/library/io.rst:735 msgid "" @@ -1021,12 +1397,18 @@ msgid "" "written. When in non-blocking mode, a :exc:`BlockingIOError` is raised if " "the buffer needs to be written out but the raw stream blocks." msgstr "" +"Escribe el :term:`bytes-like object`, *b*, y retorna el número de bytes " +"grabados. Cuando estás en modo no-bloqueo, se lanza un :exc:" +"`BlockingIOError` si el búfer tiene que ser escrito pero el *stream* sin " +"formato bloquea." #: ../Doc/library/io.rst:743 msgid "" "A buffered interface to random access streams. It inherits :class:" "`BufferedReader` and :class:`BufferedWriter`." msgstr "" +"Una interfaz búfer para *streams* de acceso aleatorio. Hereda :class:" +"`BufferedReader` y :class:`BufferedWriter`." #: ../Doc/library/io.rst:746 msgid "" @@ -1034,6 +1416,9 @@ msgid "" "in the first argument. If the *buffer_size* is omitted it defaults to :data:" "`DEFAULT_BUFFER_SIZE`." msgstr "" +"El constructor crea un lector y una grabación para un *stream* sin formato " +"buscable, dado en el primer argumento. Si se omite el *buffer_size* este " +"recae sobre el valor predeterminado :data:`DEFAULT_BUFFER_SIZE`." #: ../Doc/library/io.rst:750 msgid "" @@ -1041,6 +1426,9 @@ msgid "" "class:`BufferedWriter` can do. In addition, :meth:`seek` and :meth:`tell` " "are guaranteed to be implemented." msgstr "" +":class:`BufferedRandom` es capaz de todo lo que puede hacer :class:" +"`BufferedReader` o :class:`BufferedWriter`. Adicionalmente, se garantiza " +"implementar :meth:`seek` y :meth:`tell`." #: ../Doc/library/io.rst:757 msgid "" @@ -1048,6 +1436,9 @@ msgid "" "objects -- one readable, the other writeable -- into a single bidirectional " "endpoint. It inherits :class:`BufferedIOBase`." msgstr "" +"Un objeto búfer E/S combinando dos objetos :class:`RawIOBase` " +"unidireccionales -- uno legible y el otro escribible -- a un punto final " +"singular bidireccional. Hereda :class:`BufferedIOBase`." #: ../Doc/library/io.rst:761 msgid "" @@ -1055,6 +1446,9 @@ msgid "" "writeable respectively. If the *buffer_size* is omitted it defaults to :" "data:`DEFAULT_BUFFER_SIZE`." msgstr "" +"*reader* y *writer* son objetos :class:`RawIOBase` que son respectivamente " +"legibles y escribibles. Si se omite *buffer_size* este se recae sobre el " +"valor predeterminado :data:`DEFAULT_BUFFER_SIZE`." #: ../Doc/library/io.rst:765 msgid "" @@ -1062,6 +1456,9 @@ msgid "" "methods except for :meth:`~BufferedIOBase.detach`, which raises :exc:" "`UnsupportedOperation`." msgstr "" +":class:`BufferedRWPair` implementa todos los métodos de :class:" +"`BufferedIOBase` excepto por :meth:`~BufferedIOBase.detach`, que lanza un :" +"exc:`UnsupportedOperation`." #: ../Doc/library/io.rst:771 msgid "" @@ -1069,6 +1466,9 @@ msgid "" "underlying raw streams. You should not pass it the same object as reader " "and writer; use :class:`BufferedRandom` instead." msgstr "" +":class:`BufferedRWPair` no intenta sincronizar accesos al *stream* sin " +"formato subyacente. No debes pasar el mismo objeto como legible y " +"escribible; usa :class:`BufferedRandom` en su lugar." #: ../Doc/library/io.rst:781 msgid "" @@ -1076,22 +1476,30 @@ msgid "" "interface to stream I/O. It inherits :class:`IOBase`. There is no public " "constructor." msgstr "" +"Clase base para los *streams* de tipo texto. Esta clase proporciona una " +"interfaz basada en caracteres y líneas para transmitir E/S. Hereda :class:" +"`IOBase`. No hay constructor público." #: ../Doc/library/io.rst:785 msgid "" ":class:`TextIOBase` provides or overrides these data attributes and methods " "in addition to those from :class:`IOBase`:" msgstr "" +":class:`TextIOBase` provee o anula estos atributos y métodos de datos además " +"de los de :class:`IOBase`:" #: ../Doc/library/io.rst:790 msgid "" "The name of the encoding used to decode the stream's bytes into strings, and " "to encode strings into bytes." msgstr "" +"El nombre de la codificación utilizada para decodificar los *bytes* del " +"*stream* a cadenas de caracteres y para codificar cadenas de caracteres en " +"bytes." #: ../Doc/library/io.rst:795 msgid "The error setting of the decoder or encoder." -msgstr "" +msgstr "La configuración de error del decodificador o codificador." #: ../Doc/library/io.rst:799 msgid "" @@ -1099,6 +1507,10 @@ msgid "" "translated so far. Depending on the implementation and the initial " "constructor flags, this may not be available." msgstr "" +"Una cadena de cracteres, una tupla de cadena de caracteres, o ``None``, " +"indicando las nuevas líneas traducidas hasta ese momento. Dependiendo de la " +"implementación y los indicadores iniciales del constructor, esto puede no " +"estar disponible." #: ../Doc/library/io.rst:805 msgid "" @@ -1106,18 +1518,24 @@ msgid "" "class:`TextIOBase` deals with. This is not part of the :class:`TextIOBase` " "API and may not exist in some implementations." msgstr "" +"El búfer binario subyacente (una instancia :class:`BufferedIOBase`) que " +"maneja :class:`TextIOBase`. Esto no es parte del API de :class:`TextIOBase` " +"y puede no existir en algunas implementaciones." #: ../Doc/library/io.rst:811 msgid "" "Separate the underlying binary buffer from the :class:`TextIOBase` and " "return it." msgstr "" +"Separa el búfer binario subyacente de :class:`TextIOBase` y lo retorna." #: ../Doc/library/io.rst:814 msgid "" "After the underlying buffer has been detached, the :class:`TextIOBase` is in " "an unusable state." msgstr "" +"Una vez que se ha separado el búfer subyacente, la :class:`TextIOBase` está " +"en un estado inutilizable." #: ../Doc/library/io.rst:817 msgid "" @@ -1125,28 +1543,38 @@ msgid "" "have the concept of an underlying buffer and calling this method will raise :" "exc:`UnsupportedOperation`." msgstr "" +"Algunas implementaciones de :class:`TextIOBase`, como :class:`StringIO`, " +"puede no tener el concepto de un búfer subyacente y llamar a este método se " +"lanzará :exc:`UnsupportedOperation`." #: ../Doc/library/io.rst:825 msgid "" "Read and return at most *size* characters from the stream as a single :class:" "`str`. If *size* is negative or ``None``, reads until EOF." msgstr "" +"Lee y retorna como máximo *size* caracteres del *stream* como un :class:" +"`str` singular. Si *size* es negativo o ``None``, lee hasta llegar al fin " +"del archivo." #: ../Doc/library/io.rst:830 msgid "" "Read until newline or EOF and return a single ``str``. If the stream is " "already at EOF, an empty string is returned." msgstr "" +"Leer hasta la nueva línea o fin del archivo y retorna un ``str`` singular. " +"Si el *stream* está al fin del archivo una cadena de caracteres se retorna." #: ../Doc/library/io.rst:833 msgid "If *size* is specified, at most *size* characters will be read." -msgstr "" +msgstr "Si se especifica *size* como máximo *size* de caracteres será leído." #: ../Doc/library/io.rst:837 msgid "" "Change the stream position to the given *offset*. Behaviour depends on the " "*whence* parameter. The default value for *whence* is :data:`SEEK_SET`." msgstr "" +"Cambia la posición del *stream* dada *offset*. El comportamiento depende del " +"parámetro *whence*. El valor dado de *whence* es :data:`SEEK_SET`." #: ../Doc/library/io.rst:841 msgid "" @@ -1154,40 +1582,54 @@ msgid "" "*offset* must either be a number returned by :meth:`TextIOBase.tell`, or " "zero. Any other *offset* value produces undefined behaviour." msgstr "" +":data:`SEEK_SET` o ``0``: buscar el inicio del *stream* (el dado); *offset* " +"debería ser un número dado por :meth:`TextIOBase.tell`, o cero. Cualquier " +"otro valor *offset* produce comportamiento indefinido." #: ../Doc/library/io.rst:845 msgid "" ":data:`SEEK_CUR` or ``1``: \"seek\" to the current position; *offset* must " "be zero, which is a no-operation (all other values are unsupported)." msgstr "" +":data:`SEEK_CUR` o ``1``: buscar la posición actual; *offset* debería ser " +"cero, que es una operación no (no se apoya ningún otro valor)." #: ../Doc/library/io.rst:848 msgid "" ":data:`SEEK_END` or ``2``: seek to the end of the stream; *offset* must be " "zero (all other values are unsupported)." msgstr "" +":data:`SEEK_END` o ``2``: buscar el fin del *stream*; *offset* debería ser " +"cero (cualquier otro valor no es apoyado)." #: ../Doc/library/io.rst:851 msgid "Return the new absolute position as an opaque number." -msgstr "" +msgstr "Retorna la nueva posición absoluta como un número opaco." #: ../Doc/library/io.rst:858 msgid "" "Return the current stream position as an opaque number. The number does not " "usually represent a number of bytes in the underlying binary storage." msgstr "" +"Retorna la posición actual de la secuencia como un número opaco. El número " +"no suele representar una cantidad de bytes en el almacenamiento binario " +"subyacente." #: ../Doc/library/io.rst:864 msgid "" "Write the string *s* to the stream and return the number of characters " "written." msgstr "" +"Escribe la cadena de caracteres *s* al *stream* y retorna el número de " +"caracteres grabadas." #: ../Doc/library/io.rst:871 msgid "" "A buffered text stream over a :class:`BufferedIOBase` binary stream. It " "inherits :class:`TextIOBase`." msgstr "" +"Una secuencia de texto almacenado sobre un *stream* binario :class:" +"`BufferedIOBase`. Hereda :class:`TextIOBase`." #: ../Doc/library/io.rst:874 msgid "" @@ -1195,6 +1637,9 @@ msgid "" "encoded with. It defaults to :func:`locale.getpreferredencoding(False) " "`." msgstr "" +"*encoding* da el nombre de la codificación con que el *stream* será " +"codificada o descodificado. Se da al valor predeterminado :func:`locale." +"getpreferredencoding(False) `." #: ../Doc/library/io.rst:878 msgid "" @@ -1210,12 +1655,28 @@ msgid "" "\\N{...}`` escape sequences) can be used. Any other error handling name " "that has been registered with :func:`codecs.register_error` is also valid." msgstr "" +"*errors* es una cadena de caracteres opcional que especifica cómo se manejan " +"los errores codificados y descodificados. Pasa ``'strict'`` para lanzar una " +"excepción :exc:`ValueError` si hay un error codificado (el valor " +"predeterminado ``None`` tiene el mismo efecto), o pasa ``'ignore'`` para " +"ignorar errores. (Tenga en cuenta que ignorar errores puede llevar a perder " +"datos). ``'replace'`` causa un marcador de reemplazo (como ``'?'``) para ser " +"insertado donde haya datos mal formados. ``'backslashreplace'`` reemplaza " +"datos mal formados con una secuencia de escape de tipo barra invertida. " +"Cuando se escribe, ``'xmlcharrefreplace'`` (reemplazar con la referencia " +"apropiada de XML) o ``'namereplace'`` (reemplazar con secuencias de " +"caracteres ``\\N{…}``) pueden ser usadas. Cualquier otro nombre de manejador " +"de errores que hayan sido registrados con :func:`codecs.register_error` " +"también son validas." #: ../Doc/library/io.rst:894 msgid "" "*newline* controls how line endings are handled. It can be ``None``, " "``''``, ``'\\n'``, ``'\\r'``, and ``'\\r\\n'``. It works as follows:" msgstr "" +"*newline* controla cómo finalizar las terminaciones de líneas. Pueden ser " +"``None``, ``''``, ``'\\n'``, ``'\\r'``, and ``'\\r\\n'``. Funciona de la " +"siguiente manera:" #: ../Doc/library/io.rst:897 msgid "" @@ -1228,6 +1689,14 @@ msgid "" "terminated by the given string, and the line ending is returned to the " "caller untranslated." msgstr "" +"Al leer la entrada del *stream*, si *newline* es ``None``, el modo :term:" +"`universal newlines` está habilitada. Líneas en la entrada pueden terminar " +"en ``'\\n'``, ``'\\r'``, o ``'\\r\\n'``, y estos son traducidos a ``'\\n'`` " +"antes de ser retornados al llamador. Si es ``''``, se habilita el modo " +"universal de nuevas líneas, pero las terminaciones de líneas son retornados " +"al llamador sin traducir. Si tiene cualquiera de los otros valores legales, " +"líneas de ingreso son terminadas por la cadena de caracteres dada, y la " +"línea final se retorna al llamado sin traducir." #: ../Doc/library/io.rst:906 msgid "" @@ -1237,12 +1706,20 @@ msgid "" "takes place. If *newline* is any of the other legal values, any ``'\\n'`` " "characters written are translated to the given string." msgstr "" +"Al escribir la salida al *stream*, si *newline* es ``None``, cualquier " +"carácter ``'\\n'`` escrito son traducidos a la línea separador *default* del " +"sistema, :data:`os.linesep`. Si *newline* es ``''`` o ``'\\n'``, la " +"traducción no ocurre. Si *newline* es de cualquier de los otros valores " +"legales, cualquier carácter ``'\\n'`` escrito es traducido a la cadena de " +"caracteres dada." #: ../Doc/library/io.rst:912 msgid "" "If *line_buffering* is ``True``, :meth:`flush` is implied when a call to " "write contains a newline character or a carriage return." msgstr "" +"Si *line_buffering* es ``True``, se implica :meth:`flush` cuando una llamada " +"a grabar contiene un carácter de nueva línea o un retorno." #: ../Doc/library/io.rst:915 msgid "" @@ -1250,10 +1727,14 @@ msgid "" "be buffered: any data written on the :class:`TextIOWrapper` object is " "immediately handled to its underlying binary *buffer*." msgstr "" +"Si *write_through* es ``True``, llamadas a :meth:`write` no garantizan ser " +"pasados por el proceso de búfer: cualquier dato grabado en el objeto :class:" +"`TextIOWrapper` es inmediatamente manejado por el *buffer* binario " +"subyacente." #: ../Doc/library/io.rst:919 msgid "The *write_through* argument has been added." -msgstr "" +msgstr "Se ha agregado el argumento *write_through*." #: ../Doc/library/io.rst:922 msgid "" @@ -1262,32 +1743,44 @@ msgid "" "encoding using :func:`locale.setlocale`, use the current locale encoding " "instead of the user preferred encoding." msgstr "" +"La codificación (*encoding*) por defecto es ahora ``locale." +"getpreferredencoding(False)`` en vez de ``locale.getpreferredencoding()``. " +"No cambie temporalmente la codificación local usando :func:`locale." +"setlocale`, use la codificación local actual en vez del preferido del " +"usaurio." #: ../Doc/library/io.rst:928 msgid "" ":class:`TextIOWrapper` provides these members in addition to those of :class:" "`TextIOBase` and its parents:" msgstr "" +":class:`TextIOWrapper` provee estos miembros además de las de :class:" +"`TextIOBase` y sus padres:" #: ../Doc/library/io.rst:933 msgid "Whether line buffering is enabled." -msgstr "" +msgstr "Si el almacenamiento en línea está habilitado." #: ../Doc/library/io.rst:937 msgid "Whether writes are passed immediately to the underlying binary buffer." -msgstr "" +msgstr "Si grabaciones son pasadas inmediatamente al búfer binario subyacente." #: ../Doc/library/io.rst:945 msgid "" "Reconfigure this text stream using new settings for *encoding*, *errors*, " "*newline*, *line_buffering* and *write_through*." msgstr "" +"Reconfigura este *stream* textual usando las nuevas configuraciones de " +"*encoding*, *errors*, *newline*, *line_buffering* y *write_through*." #: ../Doc/library/io.rst:948 msgid "" "Parameters not specified keep current settings, except ``errors='strict'`` " "is used when *encoding* is specified but *errors* is not specified." msgstr "" +"Los parámetros que no son especificados mantienen las configuraciones " +"actuales, excepto por ``errors='strict'`` cuando *encoding* se especifica " +"pero *errors* no está especificado." #: ../Doc/library/io.rst:952 msgid "" @@ -1295,17 +1788,24 @@ msgid "" "already been read from the stream. On the other hand, changing encoding " "after write is possible." msgstr "" +"No es posible cambiar la codificación o nueva línea si algunos datos han " +"sido captados por el *stream*. Sin embargo, cambiando la codificación " +"después de grabar es posible." #: ../Doc/library/io.rst:956 msgid "" "This method does an implicit stream flush before setting the new parameters." msgstr "" +"Este método hace una nivelación implícita del *stream* antes de configurar " +"los nuevos parámetros." #: ../Doc/library/io.rst:964 msgid "" "An in-memory stream for text I/O. The text buffer is discarded when the :" "meth:`~IOBase.close` method is called." msgstr "" +"Un *stream* en memoria para E/S de tipo texto. El búfer de tipo texto es " +"descartado cuando se llama al método :meth:`~IOBase.close`." #: ../Doc/library/io.rst:967 msgid "" @@ -1313,6 +1813,10 @@ msgid "" "newline translation is enabled, newlines will be encoded as if by :meth:" "`~TextIOBase.write`. The stream is positioned at the start of the buffer." msgstr "" +"El valor inicial del búfer puede ser configurado dando *initial_value*. Si " +"la traducción de la nueva línea es habilitado, nuevas líneas serán " +"codificado como si fuera por :meth:`~TextIOBase.write`. El *stream* está " +"posicionado al inicio del búfer." #: ../Doc/library/io.rst:972 msgid "" @@ -1322,12 +1826,20 @@ msgid "" "as ``\\n`` on all platforms, but universal newline decoding is still " "performed when reading." msgstr "" +"El argumento *newline* funciona como :class:`TextIOWrapper`. El valor dado " +"es considerado solamente como caracteres ``\\n`` al final de las lineas y no " +"hacen ninguna traducción de nuevas lineas. Si *newline* está configurado con " +"``None``, nuevas lineas son escritas como ``\\n`` en todas las plataformas, " +"pero descodificación universal de las nuevas lineas todavía se realiza " +"cuando se lee." #: ../Doc/library/io.rst:978 msgid "" ":class:`StringIO` provides this method in addition to those from :class:" "`TextIOBase` and its parents:" msgstr "" +":class:`StringIO` provee este método además de los de :class:`TextIOBase` y " +"sus padres:" #: ../Doc/library/io.rst:983 msgid "" @@ -1335,26 +1847,33 @@ msgid "" "decoded as if by :meth:`~TextIOBase.read`, although the stream position is " "not changed." msgstr "" +"Retorna un ``str`` que contiene el contenido entero de los búfer. Nuevas " +"lineas son descodificados como si fuera :meth:`~TextIOBase.read`, aunque la " +"posición de la transmisión no haya cambiado." #: ../Doc/library/io.rst:987 msgid "Example usage::" -msgstr "" +msgstr "Ejemplos de uso::" #: ../Doc/library/io.rst:1009 msgid "" "A helper codec that decodes newlines for :term:`universal newlines` mode. It " "inherits :class:`codecs.IncrementalDecoder`." msgstr "" +"Un códec auxiliar que descodifica nuevas líneas para el modo :term:" +"`universal newlines`. Hereda :class:`codecs.IncrementalDecoder`." #: ../Doc/library/io.rst:1014 msgid "Performance" -msgstr "" +msgstr "Rendimiento" #: ../Doc/library/io.rst:1016 msgid "" "This section discusses the performance of the provided concrete I/O " "implementations." msgstr "" +"Esta sección discute el rendimiento de las implementaciones concretas de E/S " +"proporcionadas." #: ../Doc/library/io.rst:1022 msgid "" @@ -1368,6 +1887,15 @@ msgid "" "always preferable to use buffered I/O rather than unbuffered I/O for binary " "data." msgstr "" +"Leyendo y grabando solamente grandes porciones de datos incluso cuando el " +"usuario pide para solo un byte, E/S de tipo búfer esconde toda ineficiencia " +"llamando y ejecutando las rutinas E/S del sistema operativo que no ha pasado " +"por el proceso de búfer. La ganancia depende en el OS y el tipo de E/S que " +"se ejecuta. Por ejemplo, en algunos sistemas operativos modernos como Linux, " +"un disco E/S sin búfer puede ser rápido como un E/S búfer. Al final, sin " +"embargo, es que el E/S búfer ofrece rendimiento predecible " +"independientemente de la plataforma y el dispositivo de respaldo. Entonces " +"es siempre preferible user E/S búfer que E/S sin búfer para datos binarios." #: ../Doc/library/io.rst:1034 msgid "" @@ -1378,22 +1906,33 @@ msgid "" "`TextIOWrapper.tell` and :meth:`TextIOWrapper.seek` are both quite slow due " "to the reconstruction algorithm used." msgstr "" +"E/S de tipo texto por sobre un almacenamiento binario (como un archivo) es " +"más lento que un E/S binario sobre el mismo almacenamiento porque requiere " +"conversiones entre unicode y datos binarios usando un códec de caracteres. " +"Esto puede ser notable al manejar datos enormes de texto como archivos de " +"registro. También :meth:`TextIOWrapper.tell` y :meth:`TextIOWrapper.seek` " +"son bastante lentos debido al uso del algoritmo de reconstrucción." #: ../Doc/library/io.rst:1041 msgid "" ":class:`StringIO`, however, is a native in-memory unicode container and will " "exhibit similar speed to :class:`BytesIO`." msgstr "" +":class:`StringIO`, sin embargo, es un contenedor unicode nativo en memoria y " +"exhibirá una velocidad similar a :class:`BytesIO`." #: ../Doc/library/io.rst:1045 msgid "Multi-threading" -msgstr "" +msgstr "Multihilo" #: ../Doc/library/io.rst:1047 msgid "" ":class:`FileIO` objects are thread-safe to the extent that the operating " "system calls (such as ``read(2)`` under Unix) they wrap are thread-safe too." msgstr "" +"objetos :class:`FileIO` son seguros para subprocesos en la medida en que las " +"llamadas al sistema operativo(como ``read(2)`` en Unix) que envuelven " +"también son seguros para subprocesos." #: ../Doc/library/io.rst:1050 msgid "" @@ -1402,14 +1941,18 @@ msgid "" "protect their internal structures using a lock; it is therefore safe to call " "them from multiple threads at once." msgstr "" +"Objetos binarios búfer (instancias de :class:`BufferedReader`, :class:" +"`BufferedWriter`, :class:`BufferedRandom` y :class:`BufferedRWPair`) " +"protegen sus estructuras internas usando un bloqueo; es seguro, entonces, " +"llamarlos de varios hilos a la vez." #: ../Doc/library/io.rst:1055 msgid ":class:`TextIOWrapper` objects are not thread-safe." -msgstr "" +msgstr "objetos :class:`TextIOWrapper` no son seguros para subprocesos." #: ../Doc/library/io.rst:1058 msgid "Reentrancy" -msgstr "" +msgstr "Reentrada" #: ../Doc/library/io.rst:1060 msgid "" @@ -1421,6 +1964,13 @@ msgid "" "`RuntimeError` is raised. Note this doesn't prohibit a different thread " "from entering the buffered object." msgstr "" +"Objetos binarios búfer (instancias de :class:`BufferedReader`, :class:" +"`BufferedWriter`, :class:`BufferedRandom` y :class:`BufferedRWPair`) no son " +"reentrante. Mientras llamadas reentrantes no ocurren en situaciones normales " +"pueden surgir haciendo E/S en un manejador :mod:`signal`. Si un hilo trata " +"de entrar de nuevo a un objeto búfer que se está accediendo actualmente, se " +"lanza un :exc:`RuntimeError`. Tenga en cuenta que esto no prohíbe un hilo " +"diferente entrando un objeto búfer." #: ../Doc/library/io.rst:1068 msgid "" @@ -1429,3 +1979,7 @@ msgid "" "includes standard streams and therefore affects the built-in function :func:" "`print()` as well." msgstr "" +"Lo de arriba de forma implícita extiende a los archivos de tipo texto ya que " +"la función :func:`open()` envolverá un objeto almacenado en un :class:" +"`TextIOWrapper`. Esto incluye *streams* estándar y por ende afecta la " +"función :func:`print()` también."