Skip to content

Commit c50e167

Browse files
committed
Add interpreter part of the tutorial
1 parent 4181fe8 commit c50e167

File tree

2 files changed

+157
-49
lines changed

2 files changed

+157
-49
lines changed

dict

+14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,31 @@
1+
argv
2+
backspace
13
batch
24
C
5+
command
6+
import
37
indentación
48
interactivamente
9+
m
10+
multilínea
11+
option
512
Python
13+
python
14+
prompt
15+
readline
616
recompilar
17+
ref
718
reordenar
819
s
920
script
1021
scripting
1122
scripts
1223
shell
1324
sockets
25+
sys
1426
tipado
27+
tty
1528
tutorial
1629
Tutorial
1730
X
31+
x

tutorial/interpreter.po

+143-49
Original file line numberDiff line numberDiff line change
@@ -3,70 +3,100 @@
33
# This file is distributed under the same license as the Python package.
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
6-
#, fuzzy
76
msgid ""
87
msgstr ""
98
"Project-Id-Version: Python 3.7\n"
109
"Report-Msgid-Bugs-To: \n"
1110
"POT-Creation-Date: 2019-05-06 11:59-0400\n"
12-
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13-
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14-
"Language-Team: LANGUAGE <LL@li.org>\n"
11+
"PO-Revision-Date: 2019-05-07 12:07-0400\n"
1512
"MIME-Version: 1.0\n"
1613
"Content-Type: text/plain; charset=UTF-8\n"
1714
"Content-Transfer-Encoding: 8bit\n"
15+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
16+
"Last-Translator: \n"
17+
"Language-Team: es\n"
18+
"Language: es_ES\n"
19+
"X-Generator: Poedit 2.2.1\n"
1820

1921
#: ../Doc/tutorial/interpreter.rst:5
2022
msgid "Using the Python Interpreter"
21-
msgstr ""
23+
msgstr "Usando el intérprete de Python"
2224

2325
#: ../Doc/tutorial/interpreter.rst:11
2426
msgid "Invoking the Interpreter"
25-
msgstr ""
27+
msgstr "Invocando al intérprete"
2628

2729
#: ../Doc/tutorial/interpreter.rst:13
2830
msgid ""
2931
"The Python interpreter is usually installed as :file:`/usr/local/bin/"
3032
"python3.7` on those machines where it is available; putting :file:`/usr/"
31-
"local/bin` in your Unix shell's search path makes it possible to start it by "
32-
"typing the command:"
33+
"local/bin` in your Unix shell's search path makes it possible to start it "
34+
"by typing the command:"
3335
msgstr ""
36+
"Por lo general, el intérprete de Python se instala en :file:`/usr/local/bin/"
37+
"python3.6` en las máquinas dónde está disponible; poner :file:`/usr/local/"
38+
"bin` en el camino de búsqueda de tu intérprete de comandos Unix hace "
39+
"posible iniciarlo ingresando la orden:"
3440

3541
#: ../Doc/tutorial/interpreter.rst:21
3642
msgid ""
3743
"to the shell. [#]_ Since the choice of the directory where the interpreter "
3844
"lives is an installation option, other places are possible; check with your "
39-
"local Python guru or system administrator. (E.g., :file:`/usr/local/python` "
40-
"is a popular alternative location.)"
45+
"local Python guru or system administrator. (E.g., :file:`/usr/local/"
46+
"python` is a popular alternative location.)"
4147
msgstr ""
48+
"en el terminal. [#]_ Ya que la elección del directorio dónde vivirá el "
49+
"intérprete es una opción del proceso de instalación, puede estar en otros "
50+
"lugares; consulta a tu experto Python local o administrador de sistemas. "
51+
"(Por ejemplo, :file:`/usr/local/python` es una alternativa popular)."
4252

4353
#: ../Doc/tutorial/interpreter.rst:26
4454
msgid ""
45-
"On Windows machines, the Python installation is usually placed in :file:`C:\\"
46-
"\\Python37`, though you can change this when you're running the installer. "
47-
"To add this directory to your path, you can type the following command "
48-
"into :ref:`a command prompt window <faq-run-program-under-windows>`::"
55+
"On Windows machines, the Python installation is usually placed in :file:`C:"
56+
"\\\\Python37`, though you can change this when you're running the "
57+
"installer. To add this directory to your path, you can type the following "
58+
"command into :ref:`a command prompt window <faq-run-program-under-"
59+
"windows>`::"
4960
msgstr ""
61+
"En máquinas con Windows, la instalación de Python por lo general se "
62+
"encuentra en :file:`C:\\\\Python37`, aunque se puede cambiar durante la "
63+
"instalación. Para añadir este directorio al camino de búsqueda, puedes "
64+
"ingresar la siguiente orden en el terminal :ref:`a command prompt window "
65+
"<faq-run-program-under-windows>`::"
5066

5167
#: ../Doc/tutorial/interpreter.rst:33
5268
msgid ""
5369
"Typing an end-of-file character (:kbd:`Control-D` on Unix, :kbd:`Control-Z` "
54-
"on Windows) at the primary prompt causes the interpreter to exit with a zero "
55-
"exit status. If that doesn't work, you can exit the interpreter by typing "
56-
"the following command: ``quit()``."
70+
"on Windows) at the primary prompt causes the interpreter to exit with a "
71+
"zero exit status. If that doesn't work, you can exit the interpreter by "
72+
"typing the following command: ``quit()``."
5773
msgstr ""
74+
"Se puede salir del intérprete con estado de salida cero ingresando el "
75+
"carácter de fin de archivo (:kbd:`Control-D` en Unix, :kbd:`Control-Z` en "
76+
"Windows). Si eso no funciona, puedes salir del intérprete escribiendo el "
77+
"comando: ``quit()``."
5878

5979
#: ../Doc/tutorial/interpreter.rst:38
6080
msgid ""
61-
"The interpreter's line-editing features include interactive editing, history "
62-
"substitution and code completion on systems that support readline. Perhaps "
63-
"the quickest check to see whether command line editing is supported is "
64-
"typing :kbd:`Control-P` to the first Python prompt you get. If it beeps, "
65-
"you have command line editing; see Appendix :ref:`tut-interacting` for an "
66-
"introduction to the keys. If nothing appears to happen, or if ``^P`` is "
67-
"echoed, command line editing isn't available; you'll only be able to use "
68-
"backspace to remove characters from the current line."
81+
"The interpreter's line-editing features include interactive editing, "
82+
"history substitution and code completion on systems that support readline. "
83+
"Perhaps the quickest check to see whether command line editing is supported "
84+
"is typing :kbd:`Control-P` to the first Python prompt you get. If it "
85+
"beeps, you have command line editing; see Appendix :ref:`tut-interacting` "
86+
"for an introduction to the keys. If nothing appears to happen, or if "
87+
"``^P`` is echoed, command line editing isn't available; you'll only be able "
88+
"to use backspace to remove characters from the current line."
6989
msgstr ""
90+
"Las características para edición de líneas del intérprete incluyen edición "
91+
"interactiva, sustitución de historial y completado de código en sistemas "
92+
"que soportan readline. Quizás la forma más rápida para comprobar si las "
93+
"características de edición se encuentran disponibles es escribir :kbd:"
94+
"`Control-P` en el primer prompt de Python que aparezca. Si se escucha un "
95+
"sonido, tienes edición de línea de comandos; ver Apéndice :ref:`tut-"
96+
"interacting` para una introducción a las teclas. Si no parece que ocurra "
97+
"nada, o si se muestra ``^P``, estas características no están disponibles; "
98+
"solo vas a poder usar la tecla de retroceso (backspace) para borrar los "
99+
"caracteres de la línea actual."
70100

71101
#: ../Doc/tutorial/interpreter.rst:47
72102
msgid ""
@@ -75,127 +105,191 @@ msgid ""
75105
"interactively; when called with a file name argument or with a file as "
76106
"standard input, it reads and executes a *script* from that file."
77107
msgstr ""
108+
"El intérprete funciona de manera similar al shell de Unix: cuando se le "
109+
"llama con una entrada estándar conectada a un terminal, lee y ejecuta "
110+
"comandos de manera interactiva; cuando se le llama con un argumento de "
111+
"nombre de archivo o con un archivo como entrada estándar, lee y ejecuta un "
112+
"*script* desde ese archivo."
78113

79114
#: ../Doc/tutorial/interpreter.rst:52
80115
msgid ""
81-
"A second way of starting the interpreter is ``python -c command [arg] ...``, "
82-
"which executes the statement(s) in *command*, analogous to the shell's :"
116+
"A second way of starting the interpreter is ``python -c command [arg] ..."
117+
"``, which executes the statement(s) in *command*, analogous to the shell's :"
83118
"option:`-c` option. Since Python statements often contain spaces or other "
84119
"characters that are special to the shell, it is usually advised to quote "
85120
"*command* in its entirety with single quotes."
86121
msgstr ""
122+
"Una segunda forma de iniciar el intérprete es ``python -c comando [arg] ..."
123+
"``, que ejecuta las sentencias en *comando*, similar a la opción de shell :"
124+
"option:`-c` . Como las sentencias de Python a menudo contienen espacios u "
125+
"otros caracteres que son especiales para el shell, generalmente se "
126+
"recomienda citar *comando* con comillas simples."
87127

88128
#: ../Doc/tutorial/interpreter.rst:58
89129
msgid ""
90130
"Some Python modules are also useful as scripts. These can be invoked using "
91131
"``python -m module [arg] ...``, which executes the source file for *module* "
92132
"as if you had spelled out its full name on the command line."
93133
msgstr ""
134+
"Algunos módulos de Python también son útiles como scripts. Estos pueden "
135+
"invocarse utilizando ``python -m module [arg] ...``, que ejecuta el archivo "
136+
"fuente para *module* como si se hubiera escrito el nombre completo en la "
137+
"línea de comandos."
94138

95139
#: ../Doc/tutorial/interpreter.rst:62
96140
msgid ""
97141
"When a script file is used, it is sometimes useful to be able to run the "
98142
"script and enter interactive mode afterwards. This can be done by passing :"
99143
"option:`-i` before the script."
100144
msgstr ""
145+
"Cuando se usa un script, a veces es útil poder ejecutar el script y luego "
146+
"ingresar al modo interactivo. Esto se puede hacer pasando la :option:`-i` "
147+
"antes del nombre del script."
101148

102149
#: ../Doc/tutorial/interpreter.rst:66
103150
msgid "All command line options are described in :ref:`using-on-general`."
104151
msgstr ""
152+
"Todas las opciones de la línea de comandos se describen en :ref:`using-on-"
153+
"general`."
105154

106155
#: ../Doc/tutorial/interpreter.rst:72
107156
msgid "Argument Passing"
108-
msgstr ""
157+
msgstr "Paso de argumentos"
109158

110159
#: ../Doc/tutorial/interpreter.rst:74
111160
msgid ""
112161
"When known to the interpreter, the script name and additional arguments "
113162
"thereafter are turned into a list of strings and assigned to the ``argv`` "
114163
"variable in the ``sys`` module. You can access this list by executing "
115164
"``import sys``. The length of the list is at least one; when no script and "
116-
"no arguments are given, ``sys.argv[0]`` is an empty string. When the script "
117-
"name is given as ``'-'`` (meaning standard input), ``sys.argv[0]`` is set "
118-
"to ``'-'``. When :option:`-c` *command* is used, ``sys.argv[0]`` is set to "
119-
"``'-c'``. When :option:`-m` *module* is used, ``sys.argv[0]`` is set to "
120-
"the full name of the located module. Options found after :option:`-c` "
121-
"*command* or :option:`-m` *module* are not consumed by the Python "
122-
"interpreter's option processing but left in ``sys.argv`` for the command or "
123-
"module to handle."
165+
"no arguments are given, ``sys.argv[0]`` is an empty string. When the "
166+
"script name is given as ``'-'`` (meaning standard input), ``sys.argv[0]`` "
167+
"is set to ``'-'``. When :option:`-c` *command* is used, ``sys.argv[0]`` is "
168+
"set to ``'-c'``. When :option:`-m` *module* is used, ``sys.argv[0]`` is "
169+
"set to the full name of the located module. Options found after :option:`-"
170+
"c` *command* or :option:`-m` *module* are not consumed by the Python "
171+
"interpreter's option processing but left in ``sys.argv`` for the command "
172+
"or module to handle."
124173
msgstr ""
174+
"Cuando son conocidos por el intérprete, el nombre del script y los "
175+
"argumentos adicionales se convierten a una lista de cadenas de texto "
176+
"asignada a la variable ``argv`` del módulo ``sys``. Puedes acceder a esta "
177+
"lista haciendo ``import sys``. La longitud de la lista es al menos uno; "
178+
"cuando no se utiliza ningún script o argumento, ``sys.argv[0]`` es una "
179+
"cadena vacía. Cuando se pasa el nombre del script con ``'-'`` (lo que "
180+
"significa la entrada estándar), ``sys.argv[0]`` vale ``'-'``. Cuando se "
181+
"usa :option:`-c` *comando*, ``sys.argv[0]`` vale ``'-c'``. Cuando se usa :"
182+
"option:`-m` *módulo*, ``sys.argv[0]`` contiene el valor del nombre completo "
183+
"del módulo. Las opciones encontradas después de :option:`-c` *comand* o :"
184+
"option:`-m` *módulo* no son consumidas por el procesador de opciones de "
185+
"Python pero de todas formas se almacenan en ``sys.argv`` para ser manejadas "
186+
"por el comando o módulo."
125187

126188
#: ../Doc/tutorial/interpreter.rst:90
127189
msgid "Interactive Mode"
128-
msgstr ""
190+
msgstr "Modo interactivo"
129191

130192
#: ../Doc/tutorial/interpreter.rst:92
131193
msgid ""
132194
"When commands are read from a tty, the interpreter is said to be in "
133195
"*interactive mode*. In this mode it prompts for the next command with the "
134196
"*primary prompt*, usually three greater-than signs (``>>>``); for "
135197
"continuation lines it prompts with the *secondary prompt*, by default three "
136-
"dots (``...``). The interpreter prints a welcome message stating its version "
137-
"number and a copyright notice before printing the first prompt:"
198+
"dots (``...``). The interpreter prints a welcome message stating its "
199+
"version number and a copyright notice before printing the first prompt:"
138200
msgstr ""
201+
"Cuando se leen los comandos desde un terminal, se dice que el intérprete "
202+
"está en *modo interactivo*. En este modo, espera el siguiente comando con "
203+
"el *prompt primario*, generalmente tres signos de mayor que (``>>>``); para "
204+
"las líneas de continuación, aparece el *prompt secundario*, por defecto "
205+
"tres puntos (``...``). El intérprete imprime un mensaje de bienvenida que "
206+
"indica su número de versión y un aviso de copyright antes de imprimir el "
207+
"primer *prompt primario*:"
139208

140209
#: ../Doc/tutorial/interpreter.rst:109
141210
msgid ""
142211
"Continuation lines are needed when entering a multi-line construct. As an "
143212
"example, take a look at this :keyword:`if` statement::"
144213
msgstr ""
214+
"Las líneas de continuación son necesarias cuando se ingresa una "
215+
"construcción multilínea. Como ejemplo, echa un vistazo a la sentencia :"
216+
"keyword:`if`::"
145217

146218
#: ../Doc/tutorial/interpreter.rst:119
147219
msgid "For more on interactive mode, see :ref:`tut-interac`."
148220
msgstr ""
221+
"Para más información sobre el modo interactivo, ver :ref:`tut-interac`."
149222

150223
#: ../Doc/tutorial/interpreter.rst:125
151224
msgid "The Interpreter and Its Environment"
152-
msgstr ""
225+
msgstr "El intérprete y su entorno"
153226

154227
#: ../Doc/tutorial/interpreter.rst:131
155228
msgid "Source Code Encoding"
156-
msgstr ""
229+
msgstr "Codificación del código fuente"
157230

158231
#: ../Doc/tutorial/interpreter.rst:133
159232
msgid ""
160233
"By default, Python source files are treated as encoded in UTF-8. In that "
161234
"encoding, characters of most languages in the world can be used "
162-
"simultaneously in string literals, identifiers and comments --- although the "
163-
"standard library only uses ASCII characters for identifiers, a convention "
164-
"that any portable code should follow. To display all these characters "
165-
"properly, your editor must recognize that the file is UTF-8, and it must use "
166-
"a font that supports all the characters in the file."
235+
"simultaneously in string literals, identifiers and comments --- although "
236+
"the standard library only uses ASCII characters for identifiers, a "
237+
"convention that any portable code should follow. To display all these "
238+
"characters properly, your editor must recognize that the file is UTF-8, and "
239+
"it must use a font that supports all the characters in the file."
167240
msgstr ""
241+
"De forma predeterminada, los archivos fuente de Python se tratan como "
242+
"codificados en UTF-8. En esa codificación, los caracteres de la mayoría de "
243+
"los idiomas del mundo se pueden usar simultáneamente en literales, "
244+
"identificadores y comentarios, aunque la biblioteca estándar solo usa "
245+
"caracteres ASCII para los identificadores, una convención que debería "
246+
"seguir cualquier código que sea portable.Para mostrar todos estos "
247+
"caracteres correctamente, tu editor debe reconocer que el archivo es UTF-8, "
248+
"y debe usar una fuente que admita todos los caracteres del archivo."
168249

169250
#: ../Doc/tutorial/interpreter.rst:141
170251
msgid ""
171252
"To declare an encoding other than the default one, a special comment line "
172253
"should be added as the *first* line of the file. The syntax is as follows::"
173254
msgstr ""
255+
"Para declarar una codificación que no sea la predeterminada, se debe "
256+
"agregar una línea de comentario especial como la *primera* línea del "
257+
"archivo. La sintaxis es la siguiente:"
174258

175259
#: ../Doc/tutorial/interpreter.rst:146
176-
msgid "where *encoding* is one of the valid :mod:`codecs` supported by Python."
177-
msgstr ""
260+
msgid ""
261+
"where *encoding* is one of the valid :mod:`codecs` supported by Python."
262+
msgstr "donde *encoding* es uno de los :mod:`codecs` soportados por Python."
178263

179264
#: ../Doc/tutorial/interpreter.rst:148
180265
msgid ""
181266
"For example, to declare that Windows-1252 encoding is to be used, the first "
182267
"line of your source code file should be::"
183268
msgstr ""
269+
"Por ejemplo, para declarar que se utilizará la codificación de "
270+
"Windows-1252, la primera línea del archivo de código fuente debe ser:"
184271

185272
#: ../Doc/tutorial/interpreter.rst:153
186273
msgid ""
187274
"One exception to the *first line* rule is when the source code starts with "
188275
"a :ref:`UNIX \"shebang\" line <tut-scripts>`. In this case, the encoding "
189276
"declaration should be added as the second line of the file. For example::"
190277
msgstr ""
278+
"Una excepción a la regla de *primera línea* es cuando el código fuente "
279+
"comienza con una línea :ref:`UNIX \"shebang\" line <tut-scripts>`. En ese "
280+
"caso, la declaración de codificación debe agregarse como la segunda línea "
281+
"del archivo. Por ejemplo::"
191282

192283
#: ../Doc/tutorial/interpreter.rst:161
193284
msgid "Footnotes"
194-
msgstr ""
285+
msgstr "Notas al pie"
195286

196287
#: ../Doc/tutorial/interpreter.rst:162
197288
msgid ""
198289
"On Unix, the Python 3.x interpreter is by default not installed with the "
199290
"executable named ``python``, so that it does not conflict with a "
200291
"simultaneously installed Python 2.x executable."
201292
msgstr ""
293+
"En Unix, el intérprete de Python 3.x no está instalado por defecto con el "
294+
"ejecutable llamado `` python``, por lo que no entra en conflicto con un "
295+
"ejecutable de Python 2.x instalado simultáneamente."

0 commit comments

Comments
 (0)