Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Traducido archivo library/optparse #758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Sep 29, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Traducida sección "Guía de referencia" 3/4
  • Loading branch information
fjsevilla-dev committed Sep 19, 2020
commit 49d4f2bc02c1ecad960b76fe666fb410e0ba6316
101 changes: 84 additions & 17 deletions 101 library/optparse.po
Original file line number Diff line number Diff line change
Expand Up @@ -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-09-19 08:46+0200\n"
"PO-Revision-Date: 2020-09-19 17:02+0200\n"
"Language-Team: python-doc-es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -896,7 +896,7 @@ msgid ""
"There's a lot going on here to help :mod:`optparse` generate the best "
"possible help message:"
msgstr ""
"Hay mucho trabajo por hacer aquí para ayudar a que :mod:`optparse` genere el "
"Podemos hacer muchas cosas aquí para ayudar a que :mod:`optparse` genere el "
"mejor mensaje de ayuda posible:"

#: ../Doc/library/optparse.rst:516
Expand Down Expand Up @@ -1687,8 +1687,8 @@ msgid ""
msgstr ""
"Si la acción asociada a la opción implica escribir o modificar un valor en "
"algún lugar, este atributo le dice a :mod:`optparse` dónde escribirlo: :attr:"
"`~Option.dest` es el nombre de un atributo del objeto ``options`` que :mod:` "
"optparse` construye a medida que analiza la línea de comandos."
"`~Option.dest` es el nombre de un atributo del objeto ``options`` que :mod:"
"`optparse` construye a medida que analiza la línea de comandos."

#: ../Doc/library/optparse.rst:1026
msgid ""
Expand Down Expand Up @@ -2087,54 +2087,69 @@ msgstr ""

#: ../Doc/library/optparse.rst:1284
msgid "Standard option types"
msgstr ""
msgstr "Tipos estándares de opciones"

#: ../Doc/library/optparse.rst:1286
msgid ""
":mod:`optparse` has five built-in option types: ``\"string\"``, ``\"int\"``, "
"``\"choice\"``, ``\"float\"`` and ``\"complex\"``. If you need to add new "
"option types, see section :ref:`optparse-extending-optparse`."
msgstr ""
"El módulo :mod:`optparse` proporciona cinco tipos de opciones incorporadas: "
"``\"string\"``, ``\"int\"``, ``\"choice\"``, ``\"float\"`` y ``\"complex"
"\"``. Consultar la sección :ref:`optparse-extending-optparse` si se "
"necesitan agregar nuevos tipos de opciones."

#: ../Doc/library/optparse.rst:1290
msgid ""
"Arguments to string options are not checked or converted in any way: the "
"text on the command line is stored in the destination (or passed to the "
"callback) as-is."
msgstr ""
"Los argumentos de las opciones en la cadena ingresada no se verifican ni se "
"convierten de ninguna manera: el texto de la línea de comandos se almacena "
"en el destino (o se pasa a la retrollamada) tal cual."

#: ../Doc/library/optparse.rst:1293
msgid "Integer arguments (type ``\"int\"``) are parsed as follows:"
msgstr ""
"Los argumentos enteros (tipo ``\"int\"``) se analizan de la siguiente manera:"

#: ../Doc/library/optparse.rst:1295
msgid "if the number starts with ``0x``, it is parsed as a hexadecimal number"
msgstr ""
"si el número comienza con ``0x``, se analiza como un número hexadecimal"

#: ../Doc/library/optparse.rst:1297
msgid "if the number starts with ``0``, it is parsed as an octal number"
msgstr ""
msgstr "si el número comienza con ``0``, se analiza como un número octal"

#: ../Doc/library/optparse.rst:1299
msgid "if the number starts with ``0b``, it is parsed as a binary number"
msgstr ""
msgstr "si el número comienza con ``0b``, se analiza como un número binario"

#: ../Doc/library/optparse.rst:1301
msgid "otherwise, the number is parsed as a decimal number"
msgstr ""
msgstr "en cualquier otro caso, el número se analiza como un número decimal"

#: ../Doc/library/optparse.rst:1304
msgid ""
"The conversion is done by calling :func:`int` with the appropriate base (2, "
"8, 10, or 16). If this fails, so will :mod:`optparse`, although with a more "
"useful error message."
msgstr ""
"La conversión se realiza llamando a :func:`int` con la base apropiada (2, 8, "
"10 o 16). Si esto falla, también lo hará :mod:`optparse`, aunque mostrando "
"un mensaje de error más útil para el usuario."

#: ../Doc/library/optparse.rst:1308
msgid ""
"``\"float\"`` and ``\"complex\"`` option arguments are converted directly "
"with :func:`float` and :func:`complex`, with similar error-handling."
msgstr ""
"Los argumentos de las opciones de tipo ``\"float\"`` y ``\"complex\"`` se "
"convierten directamente usando :func:`float` y :func:`complex` "
"respectivamente, con un manejo de errores similar."

#: ../Doc/library/optparse.rst:1311
msgid ""
Expand All @@ -2144,58 +2159,74 @@ msgid ""
"supplied option arguments against this master list and raises :exc:"
"`OptionValueError` if an invalid string is given."
msgstr ""
"Las opciones de tipo ``\"choice\"`` son un subtipo de las opciones ``\"string"
"\"``. El atributo de opción :attr:`~Option.choices` (que es una secuencia de "
"cadenas) define el conjunto de argumentos de opción permitidos. "
"Posteriormente, :func:`optparse.check_choice` comparará los argumentos de "
"las opciones proporcionadas por el usuario con esta lista maestra y generará "
"una excepción :exc:`OptionValueError` si se proporciona una cadena no válida."

#: ../Doc/library/optparse.rst:1321
msgid "Parsing arguments"
msgstr ""
msgstr "Analizando los argumentos"

#: ../Doc/library/optparse.rst:1323
msgid ""
"The whole point of creating and populating an OptionParser is to call its :"
"meth:`parse_args` method::"
msgstr ""
"El objetivo primario de crear y agregar opciones a un OptionParser es llamar "
"a su método :meth:`parse_args`::"

#: ../Doc/library/optparse.rst:1328
msgid "where the input parameters are"
msgstr ""
msgstr "donde los parámetros de entrada son:"

#: ../Doc/library/optparse.rst:1331 ../Doc/library/optparse.rst:1345
#: ../Doc/library/optparse.rst:1664
msgid "``args``"
msgstr ""
msgstr "``args``"

#: ../Doc/library/optparse.rst:1331
msgid "the list of arguments to process (default: ``sys.argv[1:]``)"
msgstr ""
msgstr "la lista de argumentos a procesar (por defecto: ``sys.argv [1:]``)"

#: ../Doc/library/optparse.rst:1336
msgid "``values``"
msgstr ""
msgstr "``values``"

#: ../Doc/library/optparse.rst:1334
msgid ""
"an :class:`optparse.Values` object to store option arguments in (default: a "
"new instance of :class:`Values`) -- if you give an existing object, the "
"option defaults will not be initialized on it"
msgstr ""
"un objeto de la clase :class:`optparse.Values` para almacenar en él los "
"argumentos de las opciones. Por defecto es una nueva instancia de la clase :"
"class:`Values`. Si se proporciona un objeto previamente creado, los valores "
"predeterminados de la opción no se inicializarán en el mismo"

#: ../Doc/library/optparse.rst:1338
msgid "and the return values are"
msgstr ""
msgstr "y los valores de retorno son:"

#: ../Doc/library/optparse.rst:1342
msgid "``options``"
msgstr ""
msgstr "``options``"

#: ../Doc/library/optparse.rst:1341
msgid ""
"the same object that was passed in as ``values``, or the optparse.Values "
"instance created by :mod:`optparse`"
msgstr ""
"el mismo objeto que se pasó como ``values``, o la instancia *optparse."
"Values* ​​creada por :mod:`optparse`"

#: ../Doc/library/optparse.rst:1345
msgid "the leftover positional arguments after all options have been processed"
msgstr ""
"los argumentos posicionales que quedan en la linea de comandos después de "
"que se hayan procesado todas las opciones"

#: ../Doc/library/optparse.rst:1347
msgid ""
Expand All @@ -2204,6 +2235,10 @@ msgid ""
"one for every option argument stored to an option destination) and returned "
"by :meth:`parse_args`."
msgstr ""
"El uso más habitual es no proporcionar ningún argumento por palabra clave. "
"Si se proporciona ``values``, será modificado mediante llamadas repetidas a :"
"func:`setattr` (aproximadamente una por cada argumento de opción a almacenar "
"en un destino de opción) y será devuelto por :meth:`parse_args`."

#: ../Doc/library/optparse.rst:1352
msgid ""
Expand All @@ -2212,60 +2247,87 @@ msgid ""
"message. This ultimately terminates your process with an exit status of 2 "
"(the traditional Unix exit status for command-line errors)."
msgstr ""
"Si el método :meth:`parse_args` encuentra algún error en la lista de "
"argumentos, llama al método :meth:`error` de OptionParser con un mensaje de "
"error apropiado para el usuario final. Esto causa que el proceso termine con "
"un estado de salida de 2 (el estado de salida tradicional en Unix para "
"errores en la línea de comandos)."

#: ../Doc/library/optparse.rst:1361
msgid "Querying and manipulating your option parser"
msgstr ""
msgstr "Consultar y manipular el analizador de opciones"

#: ../Doc/library/optparse.rst:1363
msgid ""
"The default behavior of the option parser can be customized slightly, and "
"you can also poke around your option parser and see what's there. "
"OptionParser provides several methods to help you out:"
msgstr ""
"El comportamiento predeterminado del analizador de opciones se puede "
"personalizar ligeramente. También se puede indagar en el analizador de "
"opciones y ver qué hay en él. OptionParser proporciona varios métodos para "
"ayudar con éstos propósitos:"

#: ../Doc/library/optparse.rst:1369
msgid ""
"Set parsing to stop on the first non-option. For example, if ``-a`` and ``-"
"b`` are both simple options that take no arguments, :mod:`optparse` normally "
"accepts this syntax::"
msgstr ""
"Configura el análisis para que se detenga en lo primero que encuentre que no "
"sea una opción. Por ejemplo, si ``-a`` y ``-b`` son opciones simples que no "
"toman argumentos, :mod:`optparse` normalmente acepta esta sintaxis::"

#: ../Doc/library/optparse.rst:1375
msgid "and treats it as equivalent to ::"
msgstr ""
msgstr "y lo trata como si fuera equivalente a ::"

#: ../Doc/library/optparse.rst:1379
msgid ""
"To disable this feature, call :meth:`disable_interspersed_args`. This "
"restores traditional Unix syntax, where option parsing stops with the first "
"non-option argument."
msgstr ""
"Para deshabilitar esta funcionalidad, debe llamarse al método :meth:"
"`disable_interspersed_args`. Esto restaura la sintaxis tradicional usada en "
"Unix, donde el análisis de opciones se detiene con el primer argumento que "
"no es una opción."

#: ../Doc/library/optparse.rst:1383
msgid ""
"Use this if you have a command processor which runs another command which "
"has options of its own and you want to make sure these options don't get "
"confused. For example, each command might have a different set of options."
msgstr ""
"Se debe usar este método si se dispone de un procesador de comandos que "
"ejecuta otro comando con sus propias opciones y se desea asegurarse de que "
"estas opciones no se confunden entre si. Lo que puede ocurrir si, por "
"ejemplo, cada comando tiene un conjunto diferente de opciones."

#: ../Doc/library/optparse.rst:1389
msgid ""
"Set parsing to not stop on the first non-option, allowing interspersing "
"switches with command arguments. This is the default behavior."
msgstr ""
"Configura el análisis para que no se detenga si encuentra un argumento que "
"no sea una opción, lo que permite intercalar modificadores con argumentos de "
"linea de comandos. Este es el comportamiento por defecto."

#: ../Doc/library/optparse.rst:1394
msgid ""
"Returns the Option instance with the option string *opt_str*, or ``None`` if "
"no options have that option string."
msgstr ""
"Retorna la instancia de Option con la cadena de opciones *opt_str*, o "
"``None`` si ninguna opción tiene esa cadena de opciones."

#: ../Doc/library/optparse.rst:1399
msgid ""
"Return ``True`` if the OptionParser has an option with option string "
"*opt_str* (e.g., ``-q`` or ``--verbose``)."
msgstr ""
"Retorna ``True`` si OptionParser tiene una opción con la cadena de opción "
"*opt_str* (por ejemplo, ``-q`` o ``--verbose``)."

#: ../Doc/library/optparse.rst:1404
msgid ""
Expand All @@ -2274,6 +2336,11 @@ msgid ""
"those option strings become invalid. If *opt_str* does not occur in any "
"option belonging to this :class:`OptionParser`, raises :exc:`ValueError`."
msgstr ""
"Si :class:`OptionParser` tiene una opción correspondiente a *opt_str *, esa "
"opción es eliminada. Si esa opción proporcionó cualquier otra cadena de "
"opciones, todas esas cadenas de opciones quedan invalidadas. Si *opt_str* no "
"aparece en ninguna opción que pertenezca a este :class:`OptionParser`, se "
"lanza una excepción :exc:`ValueError`."

#: ../Doc/library/optparse.rst:1413
msgid "Conflicts between options"
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.