-
-
Notifications
You must be signed in to change notification settings - Fork 405
Expand file tree
/
Copy pathargparse.po
More file actions
2490 lines (2213 loc) · 109 KB
/
argparse.po
File metadata and controls
2490 lines (2213 loc) · 109 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# 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: 2020-05-05 12:54+0200\n"
"PO-Revision-Date: 2020-08-26 23:50+0200\n"
"Language-Team: python-doc-es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Last-Translator: \n"
"Language: es\n"
"X-Generator: Poedit 2.4.1\n"
#: ../Doc/library/argparse.rst:2
msgid ""
":mod:`argparse` --- Parser for command-line options, arguments and sub-"
"commands"
msgstr ""
":mod:`argparse` — Analizador sintáctico (*Parser*) para las opciones, "
"argumentos y sub-comandos de la línea de comandos"
#: ../Doc/library/argparse.rst:12
msgid "**Source code:** :source:`Lib/argparse.py`"
msgstr "**Código fuente:** :source:`Lib/argparse.py`"
msgid "Tutorial"
msgstr "Tutorial"
#: ../Doc/library/argparse.rst:18
msgid ""
"This page contains the API reference information. For a more gentle "
"introduction to Python command-line parsing, have a look at the :ref:"
"`argparse tutorial <argparse-tutorial>`."
msgstr ""
"Esta página contiene la información de referencia de la API. Para una "
"introducción más amigable al análisis de la línea de comandos de Python, "
"echa un vistazo al :ref:`argparse tutorial <argparse-tutorial>`."
#: ../Doc/library/argparse.rst:22
msgid ""
"The :mod:`argparse` module makes it easy to write user-friendly command-line "
"interfaces. The program defines what arguments it requires, and :mod:"
"`argparse` will figure out how to parse those out of :data:`sys.argv`. The :"
"mod:`argparse` module also automatically generates help and usage messages "
"and issues errors when users give the program invalid arguments."
msgstr ""
"El módulo :mod:`argparse` facilita la escritura de interfaces de línea de "
"comandos amigables. El programa define qué argumentos requiere, y :mod:"
"`argparse` averiguará cómo analizar los de :data:`sys.argv`. El módulo :mod:"
"`argparse` también genera automáticamente mensajes de ayuda y de uso y "
"muestra errores cuando los usuarios dan parámetros incorrectos al programa."
#: ../Doc/library/argparse.rst:30
msgid "Example"
msgstr "Ejemplo"
#: ../Doc/library/argparse.rst:32
msgid ""
"The following code is a Python program that takes a list of integers and "
"produces either the sum or the max::"
msgstr ""
"El siguiente código es un programa Python que toma una lista de números "
"enteros y obtiene la suma o el máximo::"
#: ../Doc/library/argparse.rst:47
msgid ""
"Assuming the Python code above is saved into a file called ``prog.py``, it "
"can be run at the command line and provides useful help messages:"
msgstr ""
"Asumiendo que el código Python anterior se guarda en un archivo llamado "
"``prog.py``, se puede ejecutar en la línea de comandos y proporciona "
"mensajes de ayuda útiles:"
#: ../Doc/library/argparse.rst:64
msgid ""
"When run with the appropriate arguments, it prints either the sum or the max "
"of the command-line integers:"
msgstr ""
"Cuando se ejecuta con los parámetros apropiados, muestra la suma o el máximo "
"de los números enteros de la línea de comandos:"
#: ../Doc/library/argparse.rst:75
msgid "If invalid arguments are passed in, it will issue an error:"
msgstr "Si se pasan argumentos incorrectos, se mostrará un error:"
#: ../Doc/library/argparse.rst:83
msgid "The following sections walk you through this example."
msgstr "Las siguientes secciones te guiarán a través de este ejemplo."
#: ../Doc/library/argparse.rst:87
msgid "Creating a parser"
msgstr "Creando un analizador sintáctico (*parser*)"
#: ../Doc/library/argparse.rst:89
msgid ""
"The first step in using the :mod:`argparse` is creating an :class:"
"`ArgumentParser` object::"
msgstr ""
"El primer paso para usar :mod:`argparse` es crear un objeto :class:"
"`ArgumentParser` ::"
#: ../Doc/library/argparse.rst:94
msgid ""
"The :class:`ArgumentParser` object will hold all the information necessary "
"to parse the command line into Python data types."
msgstr ""
"El objeto :class:`ArgumentParser` contendrá toda la información necesaria "
"para analizar la línea de comandos con los tipos de datos de Python."
#: ../Doc/library/argparse.rst:99
msgid "Adding arguments"
msgstr "Añadiendo argumentos"
#: ../Doc/library/argparse.rst:101
msgid ""
"Filling an :class:`ArgumentParser` with information about program arguments "
"is done by making calls to the :meth:`~ArgumentParser.add_argument` method. "
"Generally, these calls tell the :class:`ArgumentParser` how to take the "
"strings on the command line and turn them into objects. This information is "
"stored and used when :meth:`~ArgumentParser.parse_args` is called. For "
"example::"
msgstr ""
"Completar un :class:`ArgumentParser` con información sobre los argumentos "
"del programa se hace realizando llamadas al método :meth:`~ArgumentParser."
"add_argument`. Generalmente, estas llamadas le dicen a :class:"
"`ArgumentParser` cómo capturar las cadenas de caracteres de la línea de "
"comandos y convertirlas en objetos. Esta información se almacena y se usa "
"cuando se llama a :meth:`~ArgumentParser.parse_args`. Por ejemplo::"
#: ../Doc/library/argparse.rst:113
msgid ""
"Later, calling :meth:`~ArgumentParser.parse_args` will return an object with "
"two attributes, ``integers`` and ``accumulate``. The ``integers`` attribute "
"will be a list of one or more ints, and the ``accumulate`` attribute will be "
"either the :func:`sum` function, if ``--sum`` was specified at the command "
"line, or the :func:`max` function if it was not."
msgstr ""
"Más tarde, llamando a :meth:`~ArgumentParser.parse_args` retornará un objeto "
"con dos atributos, ``integers`` y ``accumulate``. El atributo ``integers`` "
"será una lista de uno o más enteros, y el atributo ``accumulate`` será la "
"función :func:`sum`, si se especificó ``--sum`` en la línea de comandos, o "
"la función :func:`max` si no."
#: ../Doc/library/argparse.rst:121
msgid "Parsing arguments"
msgstr "Analizando argumentos"
#: ../Doc/library/argparse.rst:123
msgid ""
":class:`ArgumentParser` parses arguments through the :meth:`~ArgumentParser."
"parse_args` method. This will inspect the command line, convert each "
"argument to the appropriate type and then invoke the appropriate action. In "
"most cases, this means a simple :class:`Namespace` object will be built up "
"from attributes parsed out of the command line::"
msgstr ""
":class:`ArgumentParser` analiza los argumentos mediante el método :meth:"
"`~ArgumentParser.parse_args`. Éste inspeccionará la línea de comandos, "
"convertirá cada argumento al tipo apropiado y luego invocará la acción "
"correspondiente. En la mayoría de los casos, esto significa que un simple "
"objeto :class:`Namespace` se construirá a partir de los atributos analizados "
"en la línea de comandos::"
#: ../Doc/library/argparse.rst:132
msgid ""
"In a script, :meth:`~ArgumentParser.parse_args` will typically be called "
"with no arguments, and the :class:`ArgumentParser` will automatically "
"determine the command-line arguments from :data:`sys.argv`."
msgstr ""
"En un *script*, :meth:`~ArgumentParser.parse_args` será llamado típicamente "
"sin argumentos, y la :class:`ArgumentParser` determinará automáticamente los "
"argumentos de la línea de comandos de :data:`sys.argv`."
#: ../Doc/library/argparse.rst:138
msgid "ArgumentParser objects"
msgstr "Objetos *ArgumentParser*"
#: ../Doc/library/argparse.rst:147
msgid ""
"Create a new :class:`ArgumentParser` object. All parameters should be passed "
"as keyword arguments. Each parameter has its own more detailed description "
"below, but in short they are:"
msgstr ""
"Crea un nuevo objeto :class:`ArgumentParser`. Todos los parámetros deben "
"pasarse como argumentos de palabra clave. Cada parámetro tiene su propia "
"descripción más detallada a continuación, pero en resumen son:"
#: ../Doc/library/argparse.rst:151
msgid "prog_ - The name of the program (default: ``sys.argv[0]``)"
msgstr "prog_ - El nombre del programa (default: ``sys.argv[0]``)"
#: ../Doc/library/argparse.rst:153
msgid ""
"usage_ - The string describing the program usage (default: generated from "
"arguments added to parser)"
msgstr ""
"usage_ - La cadena de caracteres que describe el uso del programa (por "
"defecto: generado a partir de los argumentos añadidos al analizador)"
#: ../Doc/library/argparse.rst:156
msgid "description_ - Text to display before the argument help (default: none)"
msgstr ""
"description_ - Texto a mostrar antes del argumento ayuda (por defecto: "
"ninguno)"
#: ../Doc/library/argparse.rst:158
msgid "epilog_ - Text to display after the argument help (default: none)"
msgstr ""
"epilog_ - Texto a mostrar después del argumento ayuda (por defecto: ninguno)"
#: ../Doc/library/argparse.rst:160
msgid ""
"parents_ - A list of :class:`ArgumentParser` objects whose arguments should "
"also be included"
msgstr ""
"parents_ - Una lista de objetos :class:`ArgumentParser` cuyos argumentos "
"también deberían ser incluidos"
#: ../Doc/library/argparse.rst:163
msgid "formatter_class_ - A class for customizing the help output"
msgstr "formatter_class_ - Una clase para personalizar la salida de la ayuda"
#: ../Doc/library/argparse.rst:165
msgid ""
"prefix_chars_ - The set of characters that prefix optional arguments "
"(default: '-')"
msgstr ""
"prefix_chars_ - El conjunto de caracteres que preceden a los argumentos "
"opcionales (por defecto: ‘-‘)"
#: ../Doc/library/argparse.rst:168
msgid ""
"fromfile_prefix_chars_ - The set of characters that prefix files from which "
"additional arguments should be read (default: ``None``)"
msgstr ""
"fromfile_prefix_chars_ - El conjunto de caracteres que preceden a los "
"archivos de los cuales se deberían leer los argumentos adicionales (por "
"defecto: ``None``)"
#: ../Doc/library/argparse.rst:171
msgid ""
"argument_default_ - The global default value for arguments (default: "
"``None``)"
msgstr ""
"argument_default_ - El valor global por defecto de los argumentos (por "
"defecto: ``None``)"
#: ../Doc/library/argparse.rst:174
msgid ""
"conflict_handler_ - The strategy for resolving conflicting optionals "
"(usually unnecessary)"
msgstr ""
"conflict_handler_ - La estrategia para resolver los opcionales conflictivos "
"(normalmente es innecesaria)"
#: ../Doc/library/argparse.rst:177
msgid ""
"add_help_ - Add a ``-h/--help`` option to the parser (default: ``True``)"
msgstr ""
"add_help_ - Añade una opción ``-h/--help`` al analizador (por defecto: "
"``True``)"
#: ../Doc/library/argparse.rst:179
msgid ""
"allow_abbrev_ - Allows long options to be abbreviated if the abbreviation is "
"unambiguous. (default: ``True``)"
msgstr ""
"allow_abbrev_ - Permite abreviar las opciones largas si la abreviatura es "
"inequívoca. (por defecto: ``True``)"
#: ../Doc/library/argparse.rst:182
msgid "*allow_abbrev* parameter was added."
msgstr "se añadió el parámetro *allow_abbrev*."
#: ../Doc/library/argparse.rst:185
msgid ""
"In previous versions, *allow_abbrev* also disabled grouping of short flags "
"such as ``-vv`` to mean ``-v -v``."
msgstr ""
"En versiones anteriores, *allow_abbrev* también deshabilitaba la agrupación "
"de banderas (*flags*) cortas como ``-vv`` para que sea ``-v -v``."
#: ../Doc/library/argparse.rst:189 ../Doc/library/argparse.rst:687
msgid "The following sections describe how each of these are used."
msgstr ""
"En las siguientes secciones se describe cómo se utiliza cada una de ellas."
#: ../Doc/library/argparse.rst:193
msgid "prog"
msgstr "*prog*"
#: ../Doc/library/argparse.rst:195
msgid ""
"By default, :class:`ArgumentParser` objects use ``sys.argv[0]`` to determine "
"how to display the name of the program in help messages. This default is "
"almost always desirable because it will make the help messages match how the "
"program was invoked on the command line. For example, consider a file named "
"``myprogram.py`` with the following code::"
msgstr ""
"Por defecto, los objetos :class:`ArgumentParser` utilizan ``sys.argv[0]`` "
"para determinar cómo mostrar el nombre del programa en los mensajes de "
"ayuda. Este valor por defecto es casi siempre deseable porque hará que los "
"mensajes de ayuda coincidan con la forma en que el programa fue invocado en "
"la línea de comandos. Por ejemplo, considera un archivo llamado ``myprogram."
"py`` con el siguiente código::"
#: ../Doc/library/argparse.rst:206
msgid ""
"The help for this program will display ``myprogram.py`` as the program name "
"(regardless of where the program was invoked from):"
msgstr ""
"La ayuda para este programa mostrará ``myprogram.py`` como el nombre del "
"programa (sin importar desde dónde se haya invocado el programa):"
#: ../Doc/library/argparse.rst:225
msgid ""
"To change this default behavior, another value can be supplied using the "
"``prog=`` argument to :class:`ArgumentParser`::"
msgstr ""
"Para cambiar este comportamiento por defecto, se puede proporcionar otro "
"valor usando el argumento``prog=`` para :class:`ArgumentParser`::"
#: ../Doc/library/argparse.rst:235
#, python-format
msgid ""
"Note that the program name, whether determined from ``sys.argv[0]`` or from "
"the ``prog=`` argument, is available to help messages using the ``%(prog)s`` "
"format specifier."
msgstr ""
"Ten en cuenta que el nombre del programa, ya sea determinado a partir de "
"``sys.argv[0]`` o del argumento ``prog=`` , está disponible para los "
"mensajes de ayuda usando el especificador de formato ``%(prog)s``."
#: ../Doc/library/argparse.rst:252
msgid "usage"
msgstr "uso"
#: ../Doc/library/argparse.rst:254
msgid ""
"By default, :class:`ArgumentParser` calculates the usage message from the "
"arguments it contains::"
msgstr ""
"Por defecto, :class:`ArgumentParser` determina el mensaje de uso a partir de "
"los argumentos que contiene::"
#: ../Doc/library/argparse.rst:270
msgid ""
"The default message can be overridden with the ``usage=`` keyword argument::"
msgstr ""
"El mensaje por defecto puede ser sustituido con el argumento de palabra "
"clave ``usage=``::"
#: ../Doc/library/argparse.rst:285
#, python-format
msgid ""
"The ``%(prog)s`` format specifier is available to fill in the program name "
"in your usage messages."
msgstr ""
"El especificador de formato ``%(prog)s`` está preparado para introducir el "
"nombre del programa en los mensajes de ayuda."
#: ../Doc/library/argparse.rst:290
msgid "description"
msgstr "*description*"
#: ../Doc/library/argparse.rst:292
msgid ""
"Most calls to the :class:`ArgumentParser` constructor will use the "
"``description=`` keyword argument. This argument gives a brief description "
"of what the program does and how it works. In help messages, the "
"description is displayed between the command-line usage string and the help "
"messages for the various arguments::"
msgstr ""
"La mayoría de las llamadas al constructor :class:`ArgumentParser` usarán el "
"argumento de palabra clave ``description=``. Este argumento da una breve "
"descripción de lo que hace el programa y cómo funciona. En los mensajes de "
"ayuda, la descripción se muestra entre la cadena de caracteres de uso "
"(*usage*) de la línea de comandos y los mensajes de ayuda para los distintos "
"argumentos::"
#: ../Doc/library/argparse.rst:307
msgid ""
"By default, the description will be line-wrapped so that it fits within the "
"given space. To change this behavior, see the formatter_class_ argument."
msgstr ""
"Por defecto, la descripción será ajustada a una línea para que encaje en el "
"espacio dado. Para cambiar este comportamiento, revisa el argumento "
"formatter_class_."
#: ../Doc/library/argparse.rst:312
msgid "epilog"
msgstr "*epilog*"
#: ../Doc/library/argparse.rst:314
msgid ""
"Some programs like to display additional description of the program after "
"the description of the arguments. Such text can be specified using the "
"``epilog=`` argument to :class:`ArgumentParser`::"
msgstr ""
"A algunos programas les gusta mostrar una descripción adicional del programa "
"después de la descripción de los argumentos. Dicho texto puede ser "
"especificado usando el argumento ``epilog=`` para :class:`ArgumentParser`::"
#: ../Doc/library/argparse.rst:331
msgid ""
"As with the description_ argument, the ``epilog=`` text is by default line-"
"wrapped, but this behavior can be adjusted with the formatter_class_ "
"argument to :class:`ArgumentParser`."
msgstr ""
"Al igual que con el argumento description_, el texto ``epilog=`` está por "
"defecto ajustado a una línea, pero este comportamiento puede ser modificado "
"con el argumento formatter_class_ para :class:`ArgumentParser`."
#: ../Doc/library/argparse.rst:337
msgid "parents"
msgstr "*parents*"
#: ../Doc/library/argparse.rst:339
msgid ""
"Sometimes, several parsers share a common set of arguments. Rather than "
"repeating the definitions of these arguments, a single parser with all the "
"shared arguments and passed to ``parents=`` argument to :class:"
"`ArgumentParser` can be used. The ``parents=`` argument takes a list of :"
"class:`ArgumentParser` objects, collects all the positional and optional "
"actions from them, and adds these actions to the :class:`ArgumentParser` "
"object being constructed::"
msgstr ""
"A veces, varios analizadores comparten un conjunto de argumentos comunes. En "
"lugar de repetir las definiciones de estos argumentos, se puede usar un "
"único analizador con todos los argumentos compartidos y pasarlo en el "
"argumento ``parents=`` a :class:`ArgumentParser`. El argumento ``parents=`` "
"toma una lista de objetos :class:`ArgumentParser`, recoge todas las acciones "
"de posición y de opción de éstos, y añade estas acciones al objeto :class:"
"`ArgumentParser` que se está construyendo::"
#: ../Doc/library/argparse.rst:359
msgid ""
"Note that most parent parsers will specify ``add_help=False``. Otherwise, "
"the :class:`ArgumentParser` will see two ``-h/--help`` options (one in the "
"parent and one in the child) and raise an error."
msgstr ""
"Ten en cuenta que la mayoría de los analizadores padre especificarán "
"``add_help=False``. De lo contrario, el :class:`ArgumentParser` verá dos "
"opciones ``-h/—help`` (una para el padre y otra para el hijo) y generará un "
"error."
#: ../Doc/library/argparse.rst:364
msgid ""
"You must fully initialize the parsers before passing them via ``parents=``. "
"If you change the parent parsers after the child parser, those changes will "
"not be reflected in the child."
msgstr ""
"Debes inicializar completamente los analizadores antes de pasarlos a través "
"de ``parents=``. Si cambias los analizadores padre después del analizador "
"hijo, esos cambios no se reflejarán en el hijo."
#: ../Doc/library/argparse.rst:370
msgid "formatter_class"
msgstr "*formatter_class*"
#: ../Doc/library/argparse.rst:372
msgid ""
":class:`ArgumentParser` objects allow the help formatting to be customized "
"by specifying an alternate formatting class. Currently, there are four such "
"classes:"
msgstr ""
"los objetos :class:`ArgumentParser` permiten personalizar el formato de la "
"ayuda especificando una clase de formato alternativa. Actualmente, hay "
"cuatro clases de este tipo:"
#: ../Doc/library/argparse.rst:381
msgid ""
":class:`RawDescriptionHelpFormatter` and :class:`RawTextHelpFormatter` give "
"more control over how textual descriptions are displayed. By default, :class:"
"`ArgumentParser` objects line-wrap the description_ and epilog_ texts in "
"command-line help messages::"
msgstr ""
":class:`RawDescriptionHelpFormatter` y :class:`RawTextHelpFormatter` dan más "
"control sobre cómo se muestran las descripciones de texto. Por defecto, los "
"objetos :class:`ArgumentParser` ajustan a la línea los textos de "
"description_ y epilog_ en los mensajes de ayuda de la línea de comandos::"
#: ../Doc/library/argparse.rst:406
msgid ""
"Passing :class:`RawDescriptionHelpFormatter` as ``formatter_class=`` "
"indicates that description_ and epilog_ are already correctly formatted and "
"should not be line-wrapped::"
msgstr ""
"Pasar :class:`RawDescriptionHelpFormatter` como ``formatter_class=`` indica "
"que description_ y epilog_ ya tienen el formato correcto y no deben ser "
"ajustados a la línea::"
#: ../Doc/library/argparse.rst:432
msgid ""
":class:`RawTextHelpFormatter` maintains whitespace for all sorts of help "
"text, including argument descriptions. However, multiple new lines are "
"replaced with one. If you wish to preserve multiple blank lines, add spaces "
"between the newlines."
msgstr ""
":class:`RawTextHelpFormatter` mantiene espacios en blanco para todo tipo de "
"texto de ayuda, incluyendo descripciones de argumentos. Sin embargo, varias "
"líneas nuevas son reemplazadas por una sola. Si deseas conservar varias "
"líneas en blanco, añade espacios entre las nuevas líneas."
#: ../Doc/library/argparse.rst:437
msgid ""
":class:`ArgumentDefaultsHelpFormatter` automatically adds information about "
"default values to each of the argument help messages::"
msgstr ""
":class:`ArgumentDefaultsHelpFormatter` añade automáticamente información "
"sobre los valores por defecto a cada uno de los mensajes de ayuda de los "
"argumentos::"
#: ../Doc/library/argparse.rst:455
msgid ""
":class:`MetavarTypeHelpFormatter` uses the name of the type_ argument for "
"each argument as the display name for its values (rather than using the "
"dest_ as the regular formatter does)::"
msgstr ""
":class:`MetavarTypeHelpFormatter` utiliza el nombre del parámetro type_ para "
"cada argumento como el nombre a mostrar para sus valores (en lugar de "
"utilizar dest_ como lo hace el formato habitual)::"
#: ../Doc/library/argparse.rst:476
msgid "prefix_chars"
msgstr "*prefix_chars*"
#: ../Doc/library/argparse.rst:478
msgid ""
"Most command-line options will use ``-`` as the prefix, e.g. ``-f/--foo``. "
"Parsers that need to support different or additional prefix characters, e.g. "
"for options like ``+f`` or ``/foo``, may specify them using the "
"``prefix_chars=`` argument to the ArgumentParser constructor::"
msgstr ""
"La mayoría de las opciones de la línea de comandos usarán ``-`` como "
"prefijo, por ejemplo ``-f/--foo``. Los analizadores que necesiten soportar "
"caracteres prefijo diferentes o adicionales, por ejemplo, para opciones como "
"``+f`` o ``/foo``, pueden especificarlos usando el "
"argumento``prefix_chars=`` para el constructor *ArgumentParser*::"
#: ../Doc/library/argparse.rst:490
msgid ""
"The ``prefix_chars=`` argument defaults to ``'-'``. Supplying a set of "
"characters that does not include ``-`` will cause ``-f/--foo`` options to be "
"disallowed."
msgstr ""
"El argumento ``prefix_chars=`` tiene un valor por defecto de ``'-'``. "
"Proporcionar un conjunto de caracteres que no incluya ``-`` causará que las "
"opciones ``-f/--foo`` no sean inhabilitadas."
#: ../Doc/library/argparse.rst:496
msgid "fromfile_prefix_chars"
msgstr "*fromfile_prefix_chars*"
#: ../Doc/library/argparse.rst:498
msgid ""
"Sometimes, for example when dealing with a particularly long argument lists, "
"it may make sense to keep the list of arguments in a file rather than typing "
"it out at the command line. If the ``fromfile_prefix_chars=`` argument is "
"given to the :class:`ArgumentParser` constructor, then arguments that start "
"with any of the specified characters will be treated as files, and will be "
"replaced by the arguments they contain. For example::"
msgstr ""
"A veces, por ejemplo, cuando se trata de una lista de argumentos "
"particularmente larga, puede tener sentido mantener la lista de argumentos "
"en un archivo en lugar de escribirla en la línea de comandos. Si el "
"argumento ``fromfile_prefix_chars=`` se da al constructor :class:"
"`ArgumentParser`, entonces los argumentos que empiezan con cualquiera de los "
"caracteres especificados se tratarán como archivos, y serán reemplazados por "
"los argumentos que contienen. Por ejemplo::"
#: ../Doc/library/argparse.rst:512
msgid ""
"Arguments read from a file must by default be one per line (but see also :"
"meth:`~ArgumentParser.convert_arg_line_to_args`) and are treated as if they "
"were in the same place as the original file referencing argument on the "
"command line. So in the example above, the expression ``['-f', 'foo', "
"'@args.txt']`` is considered equivalent to the expression ``['-f', 'foo', '-"
"f', 'bar']``."
msgstr ""
"Los argumentos leídos de un archivo deben ser por defecto uno por línea "
"(pero vea también :meth:`~ArgumentParser.convert_arg_line_to_args`) y se "
"tratan como si estuvieran en el mismo lugar que el argumento de referencia "
"del archivo original en la línea de comandos. Así, en el ejemplo anterior, "
"la expresión ``[‘-f’, ‘foo’, ‘@args.txt’]`` se considera equivalente a la "
"expresión ``[‘-f’, ‘foo’, ‘-f’, ‘bar’]``."
#: ../Doc/library/argparse.rst:518
msgid ""
"The ``fromfile_prefix_chars=`` argument defaults to ``None``, meaning that "
"arguments will never be treated as file references."
msgstr ""
"El argumento``fromfile_prefix_chars=`` por defecto es ``None``, lo que "
"significa que los argumentos nunca serán tratados como referencias de "
"archivos."
#: ../Doc/library/argparse.rst:523
msgid "argument_default"
msgstr "*argument_default*"
#: ../Doc/library/argparse.rst:525
msgid ""
"Generally, argument defaults are specified either by passing a default to :"
"meth:`~ArgumentParser.add_argument` or by calling the :meth:`~ArgumentParser."
"set_defaults` methods with a specific set of name-value pairs. Sometimes "
"however, it may be useful to specify a single parser-wide default for "
"arguments. This can be accomplished by passing the ``argument_default=`` "
"keyword argument to :class:`ArgumentParser`. For example, to globally "
"suppress attribute creation on :meth:`~ArgumentParser.parse_args` calls, we "
"supply ``argument_default=SUPPRESS``::"
msgstr ""
"Generalmente, los valores por defecto de los argumentos se especifican ya "
"sea pasando un valor por defecto a :meth:`~ArgumentParser.add_argument` o "
"llamando a los métodos :meth:`~ArgumentParser.set_defaults` con un conjunto "
"específico de pares nombre-valor. A veces, sin embargo, puede ser útil "
"especificar un único valor por defecto para todos los argumentos del "
"analizador. Esto se puede lograr pasando el argumento de palabra clave "
"``argument_default=`` a :class:`ArgumentParser`. Por ejemplo, para suprimir "
"globalmente la creación de atributos en las llamadas a :meth:"
"`~ArgumentParser.parse_args` , proporcionamos el argumento "
"``argument_default=SUPPRESS``::"
#: ../Doc/library/argparse.rst:545
msgid "allow_abbrev"
msgstr "*allow_abbrev*"
#: ../Doc/library/argparse.rst:547
msgid ""
"Normally, when you pass an argument list to the :meth:`~ArgumentParser."
"parse_args` method of an :class:`ArgumentParser`, it :ref:`recognizes "
"abbreviations <prefix-matching>` of long options."
msgstr ""
"Normalmente, cuando pasas una lista de argumentos al método :meth:"
"`~ArgumentParser.parse_args` de un :class:`ArgumentParser`, :ref:`reconoce "
"las abreviaturas <prefix-matching>` de las opciones largas."
#: ../Doc/library/argparse.rst:551
msgid "This feature can be disabled by setting ``allow_abbrev`` to ``False``::"
msgstr ""
"Esta característica puede ser desactivada poniendo ``allow_abbrev`` a "
"``False``::"
#: ../Doc/library/argparse.rst:564
msgid "conflict_handler"
msgstr "*conflict_handler*"
#: ../Doc/library/argparse.rst:566
msgid ""
":class:`ArgumentParser` objects do not allow two actions with the same "
"option string. By default, :class:`ArgumentParser` objects raise an "
"exception if an attempt is made to create an argument with an option string "
"that is already in use::"
msgstr ""
"Los objetos :class:`ArgumentParser` no permiten dos acciones con la misma "
"cadena de caracteres de opción. Por defecto, los objetos :class:"
"`ArgumentParser` lanzan una excepción si se intenta crear un argumento con "
"una cadena de caracteres de opción que ya está en uso::"
#: ../Doc/library/argparse.rst:578
msgid ""
"Sometimes (e.g. when using parents_) it may be useful to simply override any "
"older arguments with the same option string. To get this behavior, the "
"value ``'resolve'`` can be supplied to the ``conflict_handler=`` argument "
"of :class:`ArgumentParser`::"
msgstr ""
"A veces (por ejemplo, cuando se utiliza parents_) puede ser útil anular "
"simplemente cualquier argumento antiguo con la misma cadena de caracteres de "
"opción. Para lograr este comportamiento, se puede suministrar el valor "
"``'resolve'`` al argumento ``conflict_handler=`` de :class:`ArgumentParser`::"
#: ../Doc/library/argparse.rst:594
msgid ""
"Note that :class:`ArgumentParser` objects only remove an action if all of "
"its option strings are overridden. So, in the example above, the old ``-f/--"
"foo`` action is retained as the ``-f`` action, because only the ``--foo`` "
"option string was overridden."
msgstr ""
"Ten en cuenta que los objetos :class:`ArgumentParser` sólo eliminan una "
"acción si todas sus cadenas de caracteres de opción están anuladas. Así, en "
"el ejemplo anterior, la antigua acción ``-f/--foo`` se mantiene como la "
"acción``-f``, porque sólo la cadena de caracteres de opción ``--foo`` fue "
"anulada."
#: ../Doc/library/argparse.rst:601
msgid "add_help"
msgstr "*add_help*"
#: ../Doc/library/argparse.rst:603
msgid ""
"By default, ArgumentParser objects add an option which simply displays the "
"parser's help message. For example, consider a file named ``myprogram.py`` "
"containing the following code::"
msgstr ""
"Por defecto, los objetos *ArgumentParser* añaden una opción que simplemente "
"muestra el mensaje de ayuda del analizador. Por ejemplo, considera un "
"archivo llamado ``myprogram.py`` que contiene el siguiente código::"
#: ../Doc/library/argparse.rst:612
msgid ""
"If ``-h`` or ``--help`` is supplied at the command line, the ArgumentParser "
"help will be printed:"
msgstr ""
"Si ``-h`` o ``--help`` se indica en la línea de comandos, se imprimirá la "
"ayuda de *ArgumentParser*:"
#: ../Doc/library/argparse.rst:624
msgid ""
"Occasionally, it may be useful to disable the addition of this help option. "
"This can be achieved by passing ``False`` as the ``add_help=`` argument to :"
"class:`ArgumentParser`::"
msgstr ""
"Ocasionalmente, puede ser útil desactivar la inclusión de esta opción de "
"ayuda. Esto se puede lograr pasando ``False`` como argumento de "
"``add_help=`` a :class:`ArgumentParser`::"
#: ../Doc/library/argparse.rst:636
msgid ""
"The help option is typically ``-h/--help``. The exception to this is if the "
"``prefix_chars=`` is specified and does not include ``-``, in which case ``-"
"h`` and ``--help`` are not valid options. In this case, the first character "
"in ``prefix_chars`` is used to prefix the help options::"
msgstr ""
"La opción de ayuda es típicamente ``-h/--help``. La excepción a esto es si "
"``prefix_chars=`` se especifica y no incluye ``-``, en cuyo caso ``-h`` y "
"``--help`` no son opciones válidas. En este caso, el primer carácter en "
"``prefix_chars`` se utiliza para preceder a las opciones de ayuda::"
#: ../Doc/library/argparse.rst:651
msgid "The add_argument() method"
msgstr "El método *add_argument()*"
#: ../Doc/library/argparse.rst:657
msgid ""
"Define how a single command-line argument should be parsed. Each parameter "
"has its own more detailed description below, but in short they are:"
msgstr ""
"Define cómo se debe interpretar un determinado argumento de línea de "
"comandos. Cada parámetro tiene su propia descripción más detallada a "
"continuación, pero en resumen son::"
#: ../Doc/library/argparse.rst:660
msgid ""
"`name or flags`_ - Either a name or a list of option strings, e.g. ``foo`` "
"or ``-f, --foo``."
msgstr ""
"`name or flags`_ - Ya sea un nombre o una lista de cadena de caracteres de "
"opción, e.g. ``foo`` o ``-f, --foo``."
#: ../Doc/library/argparse.rst:663
msgid ""
"action_ - The basic type of action to be taken when this argument is "
"encountered at the command line."
msgstr ""
"action_ - El tipo básico de acción a tomar cuando este argumento se "
"encuentra en la línea de comandos."
#: ../Doc/library/argparse.rst:666
msgid "nargs_ - The number of command-line arguments that should be consumed."
msgstr ""
"nargs_ - El número de argumentos de la línea de comandos que deben ser "
"consumidos."
#: ../Doc/library/argparse.rst:668
msgid ""
"const_ - A constant value required by some action_ and nargs_ selections."
msgstr ""
"const_ - Un valor fijo requerido por algunas selecciones de action_ y nargs_."
#: ../Doc/library/argparse.rst:670
msgid ""
"default_ - The value produced if the argument is absent from the command "
"line."
msgstr ""
"default_ - El valor dado si el argumento está ausente de la línea de "
"comandos."
#: ../Doc/library/argparse.rst:673
msgid ""
"type_ - The type to which the command-line argument should be converted."
msgstr ""
"type_ - El tipo al que debe convertirse el argumento de la línea de comandos."
#: ../Doc/library/argparse.rst:675
msgid "choices_ - A container of the allowable values for the argument."
msgstr "choices_ - Un contenedor con los valores permitidos para el argumento."
#: ../Doc/library/argparse.rst:677
msgid ""
"required_ - Whether or not the command-line option may be omitted (optionals "
"only)."
msgstr ""
"required_ - Si se puede omitir o no la opción de la línea de comandos (sólo "
"opcionales)."
#: ../Doc/library/argparse.rst:680
msgid "help_ - A brief description of what the argument does."
msgstr "help_ - Una breve descripción de lo que hace el argumento."
#: ../Doc/library/argparse.rst:682
msgid "metavar_ - A name for the argument in usage messages."
msgstr "metavar_ - Un nombre para el argumento en los mensajes de uso."
#: ../Doc/library/argparse.rst:684
msgid ""
"dest_ - The name of the attribute to be added to the object returned by :"
"meth:`parse_args`."
msgstr ""
"dest_ - El nombre del atributo que será añadido al objeto retornado por :"
"meth:`parse_args`."
#: ../Doc/library/argparse.rst:691
msgid "name or flags"
msgstr "*name or flags*"
#: ../Doc/library/argparse.rst:693
msgid ""
"The :meth:`~ArgumentParser.add_argument` method must know whether an "
"optional argument, like ``-f`` or ``--foo``, or a positional argument, like "
"a list of filenames, is expected. The first arguments passed to :meth:"
"`~ArgumentParser.add_argument` must therefore be either a series of flags, "
"or a simple argument name. For example, an optional argument could be "
"created like::"
msgstr ""
"El método :meth:`~ArgumentParser.add_argument` debe saber si se espera un "
"argumento opcional, como ``-f`` o ``--foo``, o un argumento posicional, como "
"una lista de nombres de archivos. Por lo tanto, los primeros argumentos que "
"se pasan a :meth:`~ArgumentParser.add_argument` deben ser una serie de "
"indicadores (*flags*), o un simple nombre de argumento (*name*). Por "
"ejemplo, se puede crear un argumento opcional como::"
#: ../Doc/library/argparse.rst:702
msgid "while a positional argument could be created like::"
msgstr "mientras que un argumento posicional podría ser creado como::"
#: ../Doc/library/argparse.rst:706
msgid ""
"When :meth:`~ArgumentParser.parse_args` is called, optional arguments will "
"be identified by the ``-`` prefix, and the remaining arguments will be "
"assumed to be positional::"
msgstr ""
"Cuando se llama a :meth:`~ArgumentParser.parse_args` , los argumentos "
"opcionales serán identificados por el prefijo ``-``, y el resto de los "
"argumentos serán asumidos como posicionales::"
#: ../Doc/library/argparse.rst:723
msgid "action"
msgstr "*action*"
#: ../Doc/library/argparse.rst:725
msgid ""
":class:`ArgumentParser` objects associate command-line arguments with "
"actions. These actions can do just about anything with the command-line "
"arguments associated with them, though most actions simply add an attribute "
"to the object returned by :meth:`~ArgumentParser.parse_args`. The "
"``action`` keyword argument specifies how the command-line arguments should "
"be handled. The supplied actions are:"
msgstr ""
"Los objetos :class:`ArgumentParser` asocian los argumentos de la línea de "
"comandos con las acciones. Esta acciones pueden hacer casi cualquier cosa "
"con los argumentos de línea de comandos asociados a ellas, aunque la mayoría "
"de las acciones simplemente añaden un atributo al objeto retornado por :meth:"
"`~ArgumentParser.parse_args`. El argumento de palabra clave ``action`` "
"especifica cómo deben ser manejados los argumentos de la línea de comandos. "
"Las acciones proporcionadas son:"
#: ../Doc/library/argparse.rst:731
msgid ""
"``'store'`` - This just stores the argument's value. This is the default "
"action. For example::"
msgstr ""
"``'store'`` - Esta sólo almacena el valor del argumento. Esta es la acción "
"por defecto. Por ejemplo::"
#: ../Doc/library/argparse.rst:739
msgid ""
"``'store_const'`` - This stores the value specified by the const_ keyword "
"argument. The ``'store_const'`` action is most commonly used with optional "
"arguments that specify some sort of flag. For example::"
msgstr ""
"``'store_const'`` - Esta almacena el valor especificado por el argumento de "
"palabra clave const_ . La acción ``'store_const'`` se usa más comúnmente con "
"argumentos opcionales que especifican algún tipo de indicador (*flag*). Por "
"ejemplo::"
#: ../Doc/library/argparse.rst:748
msgid ""
"``'store_true'`` and ``'store_false'`` - These are special cases of "
"``'store_const'`` used for storing the values ``True`` and ``False`` "
"respectively. In addition, they create default values of ``False`` and "
"``True`` respectively. For example::"
msgstr ""
"``'store_true'`` y ``'store_false'`` - Son casos especiales de "
"``'store_const'`` usados para almacenar los valores ``True`` y ``False`` "
"respectivamente. Además, crean valores por defecto de ``False`` y ``True`` "
"respectivamente. Por ejemplo::"
#: ../Doc/library/argparse.rst:760
msgid ""
"``'append'`` - This stores a list, and appends each argument value to the "
"list. This is useful to allow an option to be specified multiple times. "
"Example usage::"
msgstr ""
"``'append'`` - Esta almacena una lista, y añade cada valor del argumento a "
"la lista. Esto es útil para permitir que una opción sea especificada varias "
"veces. Ejemplo de uso::"
#: ../Doc/library/argparse.rst:769
msgid ""
"``'append_const'`` - This stores a list, and appends the value specified by "
"the const_ keyword argument to the list. (Note that the const_ keyword "
"argument defaults to ``None``.) The ``'append_const'`` action is typically "
"useful when multiple arguments need to store constants to the same list. For "
"example::"
msgstr ""
"``'append_const'`` - Esta almacena una lista, y añade el valor especificado "
"por el argumento de palabra clave const_ a la lista. (Nótese que el "
"argumento de palabra clave const_ por defecto es ``None``.) La acción "
"``'append_const'`` es útil típicamente cuando múltiples argumentos necesitan "
"almacenar constantes a la misma lista. Por ejemplo::"
#: ../Doc/library/argparse.rst:781
msgid ""
"``'count'`` - This counts the number of times a keyword argument occurs. For "
"example, this is useful for increasing verbosity levels::"
msgstr ""
"``'count'`` - Esta cuenta el número de veces que un argumento de palabra "
"clave aparece. Por ejemplo, esto es útil para incrementar los niveles de "
"detalle::"
#: ../Doc/library/argparse.rst:789
msgid "Note, the *default* will be ``None`` unless explicitly set to *0*."
msgstr ""
"Observa, *default* (el valor por defecto) será ``None`` a menos que "
"explícitamente se establezca como *0*."
#: ../Doc/library/argparse.rst:791
msgid ""
"``'help'`` - This prints a complete help message for all the options in the "
"current parser and then exits. By default a help action is automatically "
"added to the parser. See :class:`ArgumentParser` for details of how the "
"output is created."
msgstr ""
"``'help'`` - Esta imprime un mensaje de ayuda completo para todas las "
"opciones del analizador actual y luego termina. Por defecto, se añade una "
"acción de ayuda automáticamente al analizador. Ver :class:`ArgumentParser` "
"para detalles de cómo se genera la salida."
#: ../Doc/library/argparse.rst:796
msgid ""
"``'version'`` - This expects a ``version=`` keyword argument in the :meth:"
"`~ArgumentParser.add_argument` call, and prints version information and "
"exits when invoked::"
msgstr ""
"``’version’`` - Esta espera un argumento de palabra clave ``version=`` en la "
"llamada :meth:`~ArgumentParser.add_argument`, e imprime la información de la "
"versión y finaliza cuando es invocada::"
#: ../Doc/library/argparse.rst:806
msgid ""
"``'extend'`` - This stores a list, and extends each argument value to the "
"list. Example usage::"
msgstr ""
"``’extend’`` - Esta almacena una lista, y extiende cada valor del argumento "
"a la lista. Ejemplo de uso::"
#: ../Doc/library/argparse.rst:817
msgid ""
"You may also specify an arbitrary action by passing an Action subclass or "
"other object that implements the same interface. The recommended way to do "
"this is to extend :class:`Action`, overriding the ``__call__`` method and "
"optionally the ``__init__`` method."
msgstr ""
"También puedes especificar una acción arbitraria pasando una subclase "
"*Action* u otro objeto que implemente la misma interfaz. La forma "
"recomendada de hacer esto es extender :class:`Action`, sobrescribiendo el "
"método``__call__`` y opcionalmente el método``__init__``."
#: ../Doc/library/argparse.rst:822
msgid "An example of a custom action::"
msgstr "Un ejemplo de una acción personalizada::"
#: ../Doc/library/argparse.rst:842
msgid "For more details, see :class:`Action`."
msgstr "Para más detalles, ver :class:`Action`."
#: ../Doc/library/argparse.rst:845
msgid "nargs"
msgstr "*nargs*"
#: ../Doc/library/argparse.rst:847