# Copyright (C) 2001-2020, Python Software Foundation # This file is distributed under the same license as the Python package. # Maintained by the python-doc-es workteam. # docs-es@python.org / # https://mail.python.org/mailman3/lists/docs-es.python.org/ # Check https://github.com/python/python-docs-es/blob/3.8/TRANSLATORS to get # the list of volunteers # msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-10-25 19:47+0200\n" "PO-Revision-Date: 2020-07-07 02:12-0500\n" "Last-Translator: Juan Alegría \n" "Language: es_CO\n" "Language-Team: python-doc-es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" #: ../Doc/library/cmd.rst:2 msgid ":mod:`cmd` --- Support for line-oriented command interpreters" msgstr ":mod:`cmd` — Soporte para intérpretes orientados a línea de comandos" #: ../Doc/library/cmd.rst:9 msgid "**Source code:** :source:`Lib/cmd.py`" msgstr "**Código fuente:** :source:`Lib/cmd.py`" #: ../Doc/library/cmd.rst:13 msgid "" "The :class:`Cmd` class provides a simple framework for writing line-oriented " "command interpreters. These are often useful for test harnesses, " "administrative tools, and prototypes that will later be wrapped in a more " "sophisticated interface." msgstr "" "La clase :class:`Cmd` proporciona un *framework* simple para escribir " "intérpretes de comandos orientados a línea. A menudo son útiles para agentes " "de prueba, herramientas administrativas y prototipos que luego se incluirán " "en una interfaz más sofisticada." #: ../Doc/library/cmd.rst:20 msgid "" "A :class:`Cmd` instance or subclass instance is a line-oriented interpreter " "framework. There is no good reason to instantiate :class:`Cmd` itself; " "rather, it's useful as a superclass of an interpreter class you define " "yourself in order to inherit :class:`Cmd`'s methods and encapsulate action " "methods." msgstr "" "Una instancia :class:`Cmd` o subclase de la instancia es un *framework* " "intérprete orientado a líneas. No hay una buena razón para crear instancias :" "class:`Cmd`; mas bien, es útil como una super clase de una clase intérprete " "que usted define con el fin de heredar métodos :class:`Cmd` y encapsular " "métodos de acción." #: ../Doc/library/cmd.rst:25 msgid "" "The optional argument *completekey* is the :mod:`readline` name of a " "completion key; it defaults to :kbd:`Tab`. If *completekey* is not :const:" "`None` and :mod:`readline` is available, command completion is done " "automatically." msgstr "" "El argumento opcional *completekey* es el nombre :mod:`readline` de una " "llave de finalización; por defecto es :kbd:`Tab`. Si *completekey* no es :" "const:`None` y :mod:`readline` está disponible, el comando de finalización " "es hecho automáticamente." #: ../Doc/library/cmd.rst:29 msgid "" "The optional arguments *stdin* and *stdout* specify the input and output " "file objects that the Cmd instance or subclass instance will use for input " "and output. If not specified, they will default to :data:`sys.stdin` and :" "data:`sys.stdout`." msgstr "" "Los argumentos opcionales *stdin* y *stdout* especifican la entrada y salida " "de los objetos archivo que la instancia Cmd o la instancia subclase usará " "para la entrada y salida. Si no está especificado, se predeterminarán a :" "data:`sys.stdin` y :data:`sys.stdout`." #: ../Doc/library/cmd.rst:34 msgid "" "If you want a given *stdin* to be used, make sure to set the instance's :" "attr:`use_rawinput` attribute to ``False``, otherwise *stdin* will be " "ignored." msgstr "" "Si desea un *stdin* dado a ser usado, asegúrese de establecer las instancias " "atributo :attr:`use_rawinput` a ``False``, de lo contrario *stdin* será " "ignorado." #: ../Doc/library/cmd.rst:42 msgid "Cmd Objects" msgstr "Objetos Cmd" #: ../Doc/library/cmd.rst:44 msgid "A :class:`Cmd` instance has the following methods:" msgstr "Una instancia :class:`Cmd` tiene los siguientes métodos:" #: ../Doc/library/cmd.rst:49 msgid "" "Repeatedly issue a prompt, accept input, parse an initial prefix off the " "received input, and dispatch to action methods, passing them the remainder " "of the line as argument." msgstr "" "Emita repetidamente una solicitud, acepte la entrada, analice un prefijo " "inicial de la entrada recibida y envíe a los métodos de acción, pasándoles " "el resto de la línea como argumento." #: ../Doc/library/cmd.rst:53 msgid "" "The optional argument is a banner or intro string to be issued before the " "first prompt (this overrides the :attr:`intro` class attribute)." msgstr "" "El argumento opcional es un *banner* o cadena de caracteres introductoria " "que se tramitará antes del primer mensaje (esto anula el atributo de clase :" "attr:`intro`)." #: ../Doc/library/cmd.rst:56 msgid "" "If the :mod:`readline` module is loaded, input will automatically inherit :" "program:`bash`\\ -like history-list editing (e.g. :kbd:`Control-P` scrolls " "back to the last command, :kbd:`Control-N` forward to the next one, :kbd:" "`Control-F` moves the cursor to the right non-destructively, :kbd:`Control-" "B` moves the cursor to the left non-destructively, etc.)." msgstr "" "Si el módulo :mod:`readline` es cargado, la entrada heredará " "automáticamente :program:`bash`\\ -como edición historia-lista (e.g. :kbd:" "`Control-P` retorna al último comando, :kbd:`Control-N` adelanta al " "siguiente, :kbd:`Control-F` mueve el cursor a la derecha no " "destructivamente, :kbd:`Control-B` mueve el cursor a la izquierda no " "destructivamente, etc.)." #: ../Doc/library/cmd.rst:62 msgid "An end-of-file on input is passed back as the string ``'EOF'``." msgstr "" "Un fin-de-archivo en la entrada es retornado como cadena de caracteres " "``’EOF’``." #: ../Doc/library/cmd.rst:68 msgid "" "An interpreter instance will recognize a command name ``foo`` if and only if " "it has a method :meth:`do_foo`. As a special case, a line beginning with " "the character ``'?'`` is dispatched to the method :meth:`do_help`. As " "another special case, a line beginning with the character ``'!'`` is " "dispatched to the method :meth:`do_shell` (if such a method is defined)." msgstr "" "Una instancia del intérprete reconocerá un nombre de comando ``foo`` si y " "solo si tiene un método :meth:`do_foo`. Como un caso especial, una línea " "comenzando con el carácter ``’?’`` es enviada al método :meth:`do_help`. " "Como otro caso especial, una línea comenzando con el carácter ``’!’`` es " "enviada al método :meth:`do_shell` (Si dicho método está definido)." #: ../Doc/library/cmd.rst:74 msgid "" "This method will return when the :meth:`postcmd` method returns a true " "value. The *stop* argument to :meth:`postcmd` is the return value from the " "command's corresponding :meth:`do_\\*` method." msgstr "" "Este método retornará cuando el método :meth:`postcmd` retorna un valor " "verdadero. El argumento *stop* a :meth:`postcmd` es el valor de retorno de " "los comandos correspondientes al método :meth:`do_\\*`." #: ../Doc/library/cmd.rst:78 msgid "" "If completion is enabled, completing commands will be done automatically, " "and completing of commands args is done by calling :meth:`complete_foo` with " "arguments *text*, *line*, *begidx*, and *endidx*. *text* is the string " "prefix we are attempting to match: all returned matches must begin with it. " "*line* is the current input line with leading whitespace removed, *begidx* " "and *endidx* are the beginning and ending indexes of the prefix text, which " "could be used to provide different completion depending upon which position " "the argument is in." msgstr "" "Si completar está habilitado, comandos de completar se realizarán " "automáticamente y la finalización de los comandos *args* es realizada " "llamando :meth:`complete_foo` con los argumentos *text*, *line*, *begidx*, y " "*endidx*. *text* es el prefijo de la cadena de caracteres que estamos " "intentando emparejar: todos los emparejamientos retornados deben comenzar " "con él. *line* es la linea de entrada actual con el espacio en blanco " "inicial eliminado, *begidx* y *endidx* son los índices iniciales y finales " "del texto prefijo, que podrían usarse para proporcionar un completar " "diferente dependiendo de la posición en la que se encuentre el argumento." #: ../Doc/library/cmd.rst:86 msgid "" "All subclasses of :class:`Cmd` inherit a predefined :meth:`do_help`. This " "method, called with an argument ``'bar'``, invokes the corresponding method :" "meth:`help_bar`, and if that is not present, prints the docstring of :meth:" "`do_bar`, if available. With no argument, :meth:`do_help` lists all " "available help topics (that is, all commands with corresponding :meth:" "`help_\\*` methods or commands that have docstrings), and also lists any " "undocumented commands." msgstr "" "Todas las subclases de :class:`Cmd` heredan un :meth:`do_help` predefinido. " "Este método, llamado con el argumento ``'bar'``, invoca el método " "correspondiente :meth:`help_bar`, y si eso no está presente, imprime el " "*docstring* de :meth:`do_bar`, si está disponible. Sin argumentos, :meth:" "`do_help` enumera todos los temas de ayuda disponibles (Es decir, todos los " "comandos con los métodos correspondientes :meth:`help_\\*` o los comandos " "que tienen *docstrings*), y también enumera cualquier comando no documentado." #: ../Doc/library/cmd.rst:97 msgid "" "Interpret the argument as though it had been typed in response to the " "prompt. This may be overridden, but should not normally need to be; see the :" "meth:`precmd` and :meth:`postcmd` methods for useful execution hooks. The " "return value is a flag indicating whether interpretation of commands by the " "interpreter should stop. If there is a :meth:`do_\\*` method for the " "command *str*, the return value of that method is returned, otherwise the " "return value from the :meth:`default` method is returned." msgstr "" "Interprete el argumento como si hubiera sido escrito en respuesta a la " "solicitud. Esto puede ser anulado, pero normalmente no debería ser " "necesario; vea los métodos :meth:`precmd` y :meth:`postcmd` para enlaces de " "ejecución útiles. El valor de retorno es una bandera que indica si la " "interpretación de los comandos por parte del intérprete debe detenerse. Si " "hay un método :meth:`do_\\*` para el comando *str*, se retorna el valor de " "retorno de ese método; de lo contrario, se retorna el valor de retorno del " "método :meth:`default`." #: ../Doc/library/cmd.rst:108 msgid "" "Method called when an empty line is entered in response to the prompt. If " "this method is not overridden, it repeats the last nonempty command entered." msgstr "" "Método llamado cuando se ingresa una línea vacía en respuesta a la " "solicitud. Si este método no se anula, repite el último comando no vacío " "ingresado." #: ../Doc/library/cmd.rst:114 msgid "" "Method called on an input line when the command prefix is not recognized. If " "this method is not overridden, it prints an error message and returns." msgstr "" "Método llamado en una línea de entrada cuando no se reconoce el prefijo del " "comando. Si este método no se anula, imprime un mensaje de error y retorna." #: ../Doc/library/cmd.rst:120 msgid "" "Method called to complete an input line when no command-specific :meth:" "`complete_\\*` method is available. By default, it returns an empty list." msgstr "" "Método llamado para completar una línea de entrada cuando no hay un comando " "específico, método :meth:`complete_\\*`` está disponible. Por defecto, " "retorna una lista vacía." #: ../Doc/library/cmd.rst:126 msgid "" "Method called to display a list of strings as a compact set of columns. Each " "column is only as wide as necessary. Columns are separated by two spaces for " "readability." msgstr "" #: ../Doc/library/cmd.rst:133 msgid "" "Hook method executed just before the command line *line* is interpreted, but " "after the input prompt is generated and issued. This method is a stub in :" "class:`Cmd`; it exists to be overridden by subclasses. The return value is " "used as the command which will be executed by the :meth:`onecmd` method; " "the :meth:`precmd` implementation may re-write the command or simply return " "*line* unchanged." msgstr "" "Método de enlace ejecutado justo antes de que se interprete la línea de " "comando *line*, pero después de que se genere y emita la solicitud de " "entrada. Este método es un trozo en :class:`Cmd`; existe para ser anulado " "por subclases. El valor de retorno es utilizado como el comando que se " "ejecutará mediante el método :meth:`onecmd`; la implementación :meth:" "`precmd` puede reescribir el comando o simplemente retornar *line* sin " "cambios." #: ../Doc/library/cmd.rst:143 msgid "" "Hook method executed just after a command dispatch is finished. This method " "is a stub in :class:`Cmd`; it exists to be overridden by subclasses. *line* " "is the command line which was executed, and *stop* is a flag which indicates " "whether execution will be terminated after the call to :meth:`postcmd`; this " "will be the return value of the :meth:`onecmd` method. The return value of " "this method will be used as the new value for the internal flag which " "corresponds to *stop*; returning false will cause interpretation to continue." msgstr "" "Método de enlace ejecutado justo después de que finaliza un despacho de " "comando. Este método es un trozo en :class:`Cmd`; existe para ser anulado " "por subclases. *line* es la línea de comando que se ejecutó, y *stop* es una " "bandera que indica si la ejecución finalizará después de la llamada a :meth:" "`postcmd`; este será el valor de retorno del método :meth:`onecmd`. El valor " "de retorno de este método será usado como el nuevo valor para la bandera " "interna que corresponde a *stop*; retornando falso hará que la " "interpretación continúe." #: ../Doc/library/cmd.rst:154 msgid "" "Hook method executed once when :meth:`cmdloop` is called. This method is a " "stub in :class:`Cmd`; it exists to be overridden by subclasses." msgstr "" "Método de enlace ejecutado una vez cuando :meth:`cmdloop` es llamado. Este " "método es un trozo en :class:`Cmd`; existe para ser anulado por subclases." #: ../Doc/library/cmd.rst:160 msgid "" "Hook method executed once when :meth:`cmdloop` is about to return. This " "method is a stub in :class:`Cmd`; it exists to be overridden by subclasses." msgstr "" "Método de enlace ejecutado una vez cuando :meth:`cmdloop` está a punto de " "retornar. Este método es un trozo en :class:`Cmd`; existe para ser anulado " "por subclases." #: ../Doc/library/cmd.rst:164 msgid "" "Instances of :class:`Cmd` subclasses have some public instance variables:" msgstr "" "Instancias de subclases :class:`Cmd` tienen algunas variables de instancia " "públicas:" #: ../Doc/library/cmd.rst:168 msgid "The prompt issued to solicit input." msgstr "El aviso emitido para solicitar entradas." #: ../Doc/library/cmd.rst:173 msgid "The string of characters accepted for the command prefix." msgstr "La cadena de caracteres aceptada para el prefijo del comando." #: ../Doc/library/cmd.rst:178 msgid "The last nonempty command prefix seen." msgstr "El último prefijo de comando no vacío visto." #: ../Doc/library/cmd.rst:183 msgid "" "A list of queued input lines. The cmdqueue list is checked in :meth:" "`cmdloop` when new input is needed; if it is nonempty, its elements will be " "processed in order, as if entered at the prompt." msgstr "" "Una lista de líneas de entrada puestas en cola. La lista *cmdqueue* es " "verificada en :meth:`cmdloop` cuando una nueva entrada es necesitada; Si es " "no vacía, sus elementos serán procesados en orden, como si se ingresara en " "la solicitud." #: ../Doc/library/cmd.rst:190 msgid "" "A string to issue as an intro or banner. May be overridden by giving the :" "meth:`cmdloop` method an argument." msgstr "" "Una cadena para emitir como introducción o *banner*. Puede ser anulado dando " "un argumento al método :meth:`cmdloop`." #: ../Doc/library/cmd.rst:196 msgid "" "The header to issue if the help output has a section for documented commands." msgstr "" "El encabezado a tramitar si la salida de ayuda tiene una sección para " "comandos documentados." #: ../Doc/library/cmd.rst:201 msgid "" "The header to issue if the help output has a section for miscellaneous help " "topics (that is, there are :meth:`help_\\*` methods without corresponding :" "meth:`do_\\*` methods)." msgstr "" "El encabezado a tramitar si la salida de ayuda tiene una sección para temas " "de ayuda misceláneos (Es decir, hay métodos :meth:`help_\\*` sin los métodos " "correspondientes :meth:`do_\\*` )." #: ../Doc/library/cmd.rst:208 msgid "" "The header to issue if the help output has a section for undocumented " "commands (that is, there are :meth:`do_\\*` methods without corresponding :" "meth:`help_\\*` methods)." msgstr "" "El encabezado a tramitar si la salida de ayuda tiene una sección para " "comandos no documentados (Es decir, hay métodos :meth:`do_\\*` sin los " "métodos correspondientes :meth:`help_\\*`)." #: ../Doc/library/cmd.rst:215 msgid "" "The character used to draw separator lines under the help-message headers. " "If empty, no ruler line is drawn. It defaults to ``'='``." msgstr "" "El carácter utilizado para dibujar líneas separadoras debajo de los " "encabezados mensajes-ayuda. Si está vacío, no se dibuja una línea regla. El " "valor predeterminado es ``’=‘``." #: ../Doc/library/cmd.rst:221 msgid "" "A flag, defaulting to true. If true, :meth:`cmdloop` uses :func:`input` to " "display a prompt and read the next command; if false, :meth:`sys.stdout." "write` and :meth:`sys.stdin.readline` are used. (This means that by " "importing :mod:`readline`, on systems that support it, the interpreter will " "automatically support :program:`Emacs`\\ -like line editing and command-" "history keystrokes.)" msgstr "" "Una bandera, por defecto verdadera. Si es verdadera, :meth:`cmdloop` usa :" "func:`input` para mostrar un mensaje y leer el siguiente comando; si es " "falsa, :meth:`sys.stdout.write` y :meth:`sys.stdin.readline` son usados. " "(Esto significa que importando :mod:`readline`, en sistemas que lo soportan, " "el intérprete soportará automáticamente :program:`Emacs`\\-basados y " "comandos-historial de teclado.)" #: ../Doc/library/cmd.rst:231 msgid "Cmd Example" msgstr "Ejemplo Cmd" #: ../Doc/library/cmd.rst:235 msgid "" "The :mod:`cmd` module is mainly useful for building custom shells that let a " "user work with a program interactively." msgstr "" "El módulo :mod:`cmd` es principalmente útil para construir shells " "personalizados que permiten al usuario trabajar con un programa de forma " "interactiva." #: ../Doc/library/cmd.rst:238 msgid "" "This section presents a simple example of how to build a shell around a few " "of the commands in the :mod:`turtle` module." msgstr "" "Esta sección presenta un ejemplo simple de cómo construir un *shell* " "alrededor de algunos de los comandos en el módulo :mod:`turtle`." #: ../Doc/library/cmd.rst:241 msgid "" "Basic turtle commands such as :meth:`~turtle.forward` are added to a :class:" "`Cmd` subclass with method named :meth:`do_forward`. The argument is " "converted to a number and dispatched to the turtle module. The docstring is " "used in the help utility provided by the shell." msgstr "" "Comandos *turtle* básicos como :meth:`~turtle.forward` son añadidos a la " "subclase :class:`Cmd` con un método llamado :meth:`do_forward`. El argumento " "es convertido a un número y enviado al módulo *turtle*. El *docstring* se " "utiliza en la utilidad de ayuda proporcionada por el *shell*." #: ../Doc/library/cmd.rst:246 msgid "" "The example also includes a basic record and playback facility implemented " "with the :meth:`~Cmd.precmd` method which is responsible for converting the " "input to lowercase and writing the commands to a file. The :meth:" "`do_playback` method reads the file and adds the recorded commands to the :" "attr:`cmdqueue` for immediate playback::" msgstr "" "El ejemplo también incluye un registro básico y facilidad de reproducción " "implementado con el método :meth:`~Cmd.precmd` el cuál es el responsable de " "convertir la entrada a minúscula y escribir los comandos en un archivo. El " "método :meth:`do_playback` lee el archivo y añade los comandos grabados al :" "attr:`cmdqueue` para una reproducción inmediata::" #: ../Doc/library/cmd.rst:327 msgid "" "Here is a sample session with the turtle shell showing the help functions, " "using blank lines to repeat commands, and the simple record and playback " "facility:" msgstr "" "Aquí hay una sesión de muestra con la *turle shell* mostrando las funciones " "de ayuda, de ayuda, usando líneas en blanco para repetir comandos, un " "registro simple y facilidad de reproducción:"