-
-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathargparse.po
More file actions
2438 lines (2148 loc) · 102 KB
/
argparse.po
File metadata and controls
2438 lines (2148 loc) · 102 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
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# python-doc bot, 2025
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.9\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-09-22 21:56+0000\n"
"PO-Revision-Date: 2025-09-22 17:54+0000\n"
"Last-Translator: python-doc bot, 2025\n"
"Language-Team: Portuguese (Brazil) (https://app.transifex.com/python-doc/"
"teams/5390/pt_BR/)\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % "
"1000000 == 0 ? 1 : 2;\n"
#: ../../library/argparse.rst:2
msgid ""
":mod:`argparse` --- Parser for command-line options, arguments and sub-"
"commands"
msgstr ""
":mod:`argparse` --- Analisador sintático para opções de linha de comando, "
"argumentos e subcomandos"
#: ../../library/argparse.rst:12
msgid "**Source code:** :source:`Lib/argparse.py`"
msgstr "**Código-fonte:** :source:`Lib/argparse.py`"
#: ../../library/argparse.rstNone
msgid "Tutorial"
msgstr "Tutorial"
#: ../../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 contém informações da API de Referência. Para uma introdução "
"mais prática para o parser de linha de comando Python, acesse o :ref:"
"`tutorial do argparse <argparse-tutorial>`."
#: ../../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 ""
"O módulo :mod:`argparse` torna fácil a escrita de interfaces de linha de "
"comando amigáveis. O programa define quais argumentos são necessários e :mod:"
"`argparse` descobrirá como analisá-lo e interpretá-los a partir do :data:"
"`sys.argv`. O módulo :mod:`argparse` também gera automaticamente o texto "
"ajuda, mensagens de uso e error emitidos quando o usuário prover argumentos "
"inválidos para o programa."
#: ../../library/argparse.rst:30
msgid "Example"
msgstr "Exemplo"
#: ../../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 ""
"O código a seguir é um programa Python que recebe uma lista de inteiros e "
"apresenta a soma ou o máximo::"
#: ../../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 ""
"Assumindo que o código Python acima está salvo em um arquivo chamado ``prog."
"py``, pode-se executá-lo pela linha de comando e obter mensagens de ajuda "
"úteis:"
#: ../../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 ""
"Quando executado com argumentos apropriados, a soma ou o maior número dos "
"números digitados na linha de comando:"
#: ../../library/argparse.rst:75
msgid "If invalid arguments are passed in, it will issue an error:"
msgstr "Se argumentos inválidos são passados, um erro será emitido:"
#: ../../library/argparse.rst:83
msgid "The following sections walk you through this example."
msgstr "As próximas seções apresentarão detalhes deste exemplo."
#: ../../library/argparse.rst:87
msgid "Creating a parser"
msgstr "Criando um analisador sintático"
#: ../../library/argparse.rst:89
msgid ""
"The first step in using the :mod:`argparse` is creating an :class:"
"`ArgumentParser` object::"
msgstr ""
"O primeiro passo ao utilizar o :mod:`argparse` é criar um objeto :class:"
"`ArgumentParser`::"
#: ../../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 ""
"O objeto :class:`ArgumentParser` contém toda informação necessária para "
"análise e interpretação da linha de comando em tipos de dados Python."
#: ../../library/argparse.rst:99
msgid "Adding arguments"
msgstr "Adicionando argumentos"
#: ../../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 ""
"O preenchimento de :class:`ArgumentParser` com informações sobre os "
"argumentos do programa é feito por chamadas ao método :meth:`~ArgumentParser."
"add_argument`. Geralmente, estas chamadas informam ao :class:"
"`ArgumentParser` como traduzir strings da linha de comando e torná-los em "
"objetos. Esta informação é armazenada e utilizada quando o método :meth:"
"`~ArgumentParser.parse_args` é invocado. Por exemplo::"
#: ../../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 ""
"Em seguida, a chamada ao método :meth:`~ArgumentParser.parse_args` irá "
"retornar um objeto com dois atributos, ``integers`` e ``accumulate``. O "
"atributo ``integers`` será uma lista com um ou mais números inteiros, e o "
"atributo ``accumulate`` será ou a função :func:`sum`, se ``--sum`` for "
"especificado na linha de comando, ou a função :func:`max`, caso contrário."
#: ../../library/argparse.rst:121
msgid "Parsing arguments"
msgstr "Análise de argumentos"
#: ../../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` analisa os argumentos através do método :meth:"
"`~ArgumentParser.parse_args`. Isso inspecionará a linha de comando, "
"converterá cada argumento no tipo apropriado e, em seguida, chamará a ação "
"apropriada. Na maioria dos casos, isso significa que um objeto :class:"
"`Namespace` simples será construído a partir de atributos analisados a "
"partir da linha de comando::"
#: ../../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 ""
"Em um script, :meth:`~ArgumentParser.parse_args` será tipicamente chamado "
"sem argumentos, e :class:`ArgumentParser` irá determinar automaticamente os "
"argumentos de linha de comando de :data:`sys.argv`."
#: ../../library/argparse.rst:138
msgid "ArgumentParser objects"
msgstr "Objetos ArgumentParser"
#: ../../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 ""
"Cria um novo objeto :class:`ArgumentParser`. Todos os parâmetros devem ser "
"passados como argumentos nomeados. Cada parâmetro tem sua própria descrição "
"mais detalhada abaixo, mas em resumo eles são:"
#: ../../library/argparse.rst:151
msgid "prog_ - The name of the program (default: ``sys.argv[0]``)"
msgstr ""
#: ../../library/argparse.rst:153
msgid ""
"usage_ - The string describing the program usage (default: generated from "
"arguments added to parser)"
msgstr ""
"usage_ - A string que descreve o uso do programa (padrão: gerado a partir de "
"argumentos adicionados ao analisador sintático)"
#: ../../library/argparse.rst:156
msgid "description_ - Text to display before the argument help (default: none)"
msgstr ""
#: ../../library/argparse.rst:158
msgid "epilog_ - Text to display after the argument help (default: none)"
msgstr ""
#: ../../library/argparse.rst:160
msgid ""
"parents_ - A list of :class:`ArgumentParser` objects whose arguments should "
"also be included"
msgstr ""
"parents_ - Uma lista de objetos :class:`ArgumentParser` cujos argumentos "
"também devem ser incluídos"
#: ../../library/argparse.rst:163
msgid "formatter_class_ - A class for customizing the help output"
msgstr "formatter_class_ - Uma classe para personalizar a saída de ajuda"
#: ../../library/argparse.rst:165
msgid ""
"prefix_chars_ - The set of characters that prefix optional arguments "
"(default: '-')"
msgstr ""
"prefix_chars_ - O conjunto de caracteres que prefixam argumentos opcionais "
"(padrão: \"-\")"
#: ../../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_ - O conjunto de caracteres que prefixam os arquivos "
"dos quais os argumentos adicionais devem ser lidos (padrão: ``None``)"
#: ../../library/argparse.rst:171
msgid ""
"argument_default_ - The global default value for arguments (default: "
"``None``)"
msgstr ""
"argument_default_ - O valor padrão global para argumentos (padrão: ``None``)"
#: ../../library/argparse.rst:174
msgid ""
"conflict_handler_ - The strategy for resolving conflicting optionals "
"(usually unnecessary)"
msgstr ""
"conflict_handler_ - A estratégia para resolver opcionais conflitantes "
"(geralmente desnecessário)"
#: ../../library/argparse.rst:177
msgid ""
"add_help_ - Add a ``-h/--help`` option to the parser (default: ``True``)"
msgstr ""
"add_help_ - Adiciona uma opção ``-h/--help`` para o analisador sintático "
"(padrão: ``True``)"
#: ../../library/argparse.rst:179
msgid ""
"allow_abbrev_ - Allows long options to be abbreviated if the abbreviation is "
"unambiguous. (default: ``True``)"
msgstr ""
"allow_abbrev_ - Permite que opções longas sejam abreviadas se a abreviação "
"não for ambígua. (padrão: ``True``)"
#: ../../library/argparse.rst:182
msgid ""
"exit_on_error_ - Determines whether or not ArgumentParser exits with error "
"info when an error occurs. (default: ``True``)"
msgstr ""
"exit_on_error_ - Determina se ArgumentParser sai ou não com informações de "
"erro quando ocorre um erro. (padrão: ``True``)"
#: ../../library/argparse.rst:185
msgid "*allow_abbrev* parameter was added."
msgstr "O parâmetro *allow_abbrev* foi adicionado."
#: ../../library/argparse.rst:188
msgid ""
"In previous versions, *allow_abbrev* also disabled grouping of short flags "
"such as ``-vv`` to mean ``-v -v``."
msgstr ""
"Em versões anteriores, *allow_abbrev* também desabilitava o agrupamento de "
"sinalizadores curtos, como ``-vv`` para significar ``-v -v``."
#: ../../library/argparse.rst:192
msgid "*exit_on_error* parameter was added."
msgstr "O parâmetro *exit_on_error* foi adicionado."
#: ../../library/argparse.rst:195 ../../library/argparse.rst:715
msgid "The following sections describe how each of these are used."
msgstr "As seções a seguir descrevem como cada um deles é usado."
#: ../../library/argparse.rst:199
msgid "prog"
msgstr "prog"
#: ../../library/argparse.rst:201
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 padrão, os objetos :class:`ArgumentParser` usam ``sys.argv[0]`` para "
"determinar como exibir o nome do programa nas mensagens de ajuda. Esse "
"padrão é quase sempre desejável porque fará com que as mensagens de ajuda "
"correspondam à forma como o programa foi chamado na linha de comando. Por "
"exemplo, considere um arquivo denominado ``myprogram.py`` com o seguinte "
"código::"
#: ../../library/argparse.rst:212
msgid ""
"The help for this program will display ``myprogram.py`` as the program name "
"(regardless of where the program was invoked from):"
msgstr ""
"A ajuda para este programa exibirá ``myprogram.py`` como o nome do programa "
"(independentemente de onde o programa foi chamado):"
#: ../../library/argparse.rst:231
msgid ""
"To change this default behavior, another value can be supplied using the "
"``prog=`` argument to :class:`ArgumentParser`::"
msgstr ""
"Para alterar este comportamento padrão, outro valor pode ser fornecido "
"usando o argumento ``prog=`` para :class:`ArgumentParser`::"
#: ../../library/argparse.rst:241
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 ""
"Observe que o nome do programa, seja determinado a partir de ``sys.argv[0]`` "
"ou do argumento ``prog=``, está disponível para mensagens de ajuda usando o "
"especificador de formato ``%(prog)s``."
#: ../../library/argparse.rst:258
msgid "usage"
msgstr "usage"
#: ../../library/argparse.rst:260
msgid ""
"By default, :class:`ArgumentParser` calculates the usage message from the "
"arguments it contains::"
msgstr ""
"Por padrão, :class:`ArgumentParser` calcula a mensagem de uso a partir dos "
"argumentos que contém::"
#: ../../library/argparse.rst:276
msgid ""
"The default message can be overridden with the ``usage=`` keyword argument::"
msgstr ""
"A mensagem padrão pode ser substituído com o argumento nomeado ``usage=``::"
#: ../../library/argparse.rst:291
msgid ""
"The ``%(prog)s`` format specifier is available to fill in the program name "
"in your usage messages."
msgstr ""
"O especificador de formato ``%(prog)s`` está disponível para preencher o "
"nome do programa em suas mensagens de uso."
#: ../../library/argparse.rst:296
msgid "description"
msgstr "description"
#: ../../library/argparse.rst:298
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 ""
"A maioria das chamadas para o construtor :class:`ArgumentParser` usará o "
"argumento nomeado ``description=``. Este argumento fornece uma breve "
"descrição do que o programa faz e como funciona. Nas mensagens de ajuda, a "
"descrição é exibida entre a string de uso da linha de comando e as mensagens "
"de ajuda para os vários argumentos::"
#: ../../library/argparse.rst:313
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 padrão, a descrição terá sua linha quebrada para que se encaixe no "
"espaço fornecido. Para alterar esse comportamento, consulte o argumento "
"formatter_class_."
#: ../../library/argparse.rst:318
msgid "epilog"
msgstr "epilog"
#: ../../library/argparse.rst:320
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 ""
"Alguns programas gostam de exibir uma descrição adicional do programa após a "
"descrição dos argumentos. Esse texto pode ser especificado usando o "
"argumento ``epilog=`` para :class:`ArgumentParser`::"
#: ../../library/argparse.rst:337
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 ""
"Tal como acontece com o argumento description_, o texto de ``epilog=`` tem "
"sua quebra de linha habilitada por padrão, mas este comportamento pode ser "
"ajustado com o argumento formatter_class_ para :class:`ArgumentParser`."
#: ../../library/argparse.rst:343
msgid "parents"
msgstr "parents"
#: ../../library/argparse.rst:345
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 ""
"Às vezes, vários analisadores sintáticos compartilham um conjunto comum de "
"argumentos. Ao invés de repetir as definições desses argumentos, um único "
"analisador com todos os argumentos compartilhados e passado para o argumento "
"``parents=`` para :class:`ArgumentParser` pode ser usado. O argumento "
"``parents=`` pega uma lista de objetos :class:`ArgumentParser`, coleta todas "
"as ações posicionais e opcionais deles, e adiciona essas ações ao objeto :"
"class:`ArgumentParser` sendo construído::"
#: ../../library/argparse.rst:365
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 ""
"Observe que a maioria dos analisadores sintáticos pais especificará "
"``add_help=False``. Caso contrário, o :class:`ArgumentParser` verá duas "
"opções ``-h/--help`` (uma no pai e outra no filho) e levantará um erro."
#: ../../library/argparse.rst:370
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 ""
"Você deve inicializar totalmente os analisadores sintáticos antes de passá-"
"los via ``parents=``. Se você alterar os analisadores pais após o analisador "
"filho, essas mudanças não serão refletidas no filho."
#: ../../library/argparse.rst:376
msgid "formatter_class"
msgstr "formatter_class"
#: ../../library/argparse.rst:378
msgid ""
":class:`ArgumentParser` objects allow the help formatting to be customized "
"by specifying an alternate formatting class. Currently, there are four such "
"classes:"
msgstr ""
"Objetos :class:`ArgumentParser` permitem que a formação do texto de ajuda "
"seja personalizada por meio da especificação de uma classe de formatação "
"alternativa. Atualmente, há quatro dessas classes:"
#: ../../library/argparse.rst:387
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` e :class:`RawTextHelpFormatter` dão "
"mais controle sobre como as descrições textuais são exibidas. Por padrão, "
"objetos :class:`ArgumentParser` quebram em linha os textos description_ e "
"epilog_ nas mensagens de ajuda da linha de comando::"
#: ../../library/argparse.rst:412
msgid ""
"Passing :class:`RawDescriptionHelpFormatter` as ``formatter_class=`` "
"indicates that description_ and epilog_ are already correctly formatted and "
"should not be line-wrapped::"
msgstr ""
"Passar :class:`RawDescriptionHelpFormatter` como ``formatter_class=`` indica "
"que description_ e epilog_ já estão formatados corretamente e não devem ter "
"suas linhas quebradas::"
#: ../../library/argparse.rst:438
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` mantém espaços em branco para todos os tipos "
"de texto de ajuda, incluindo descrições de argumentos. No entanto, várias "
"novas linhas são substituídas por uma. Se você deseja preservar várias "
"linhas em branco, adicione espaços entre as novas linhas."
#: ../../library/argparse.rst:443
msgid ""
":class:`ArgumentDefaultsHelpFormatter` automatically adds information about "
"default values to each of the argument help messages::"
msgstr ""
":class:`ArgumentDefaultsHelpFormatter` adiciona automaticamente informações "
"sobre os valores padrão para cada uma das mensagens de ajuda do argumento::"
#: ../../library/argparse.rst:461
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` usa o nome de argumento type_ para cada "
"argumento como o nome de exibição para seus valores (em vez de usar o dest_ "
"como o formatador regular faz)::"
#: ../../library/argparse.rst:482
msgid "prefix_chars"
msgstr "prefix_chars"
#: ../../library/argparse.rst:484
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 ""
"A maioria das opções de linha de comando usará ``-`` como prefixo, por "
"exemplo, ``-f/--foo``. Analisadores sintáticos que precisam ter suporte a "
"caracteres de prefixo diferentes ou adicionais, por exemplo, para opções "
"como ``+f`` ou ``/foo``, podem especificá-las usando o argumento "
"``prefix_chars=`` para o construtor ArgumentParser::"
#: ../../library/argparse.rst:496
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 ""
"O argumento ``prefix_chars=`` é padronizado como ``'-'``. Fornecer um "
"conjunto de caracteres que não inclua ``-`` fará com que as opções ``-f/--"
"foo`` não sejam permitidas."
#: ../../library/argparse.rst:502
msgid "fromfile_prefix_chars"
msgstr "fromfile_prefix_chars"
#: ../../library/argparse.rst:504
msgid ""
"Sometimes, for example when dealing with a particularly long argument list, "
"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 ""
"Às vezes, por exemplo, ao lidar com uma lista de argumentos particularmente "
"longa, pode fazer sentido manter a lista de argumentos em um arquivo em vez "
"de digitá-la na linha de comando. Se o argumento ``fromfile_prefix_chars=`` "
"for dado ao construtor :class:`ArgumentParser`, então os argumentos que "
"começam com qualquer um dos caracteres especificados serão tratados como "
"arquivos e serão substituídos pelos argumentos que eles contêm. Por exemplo::"
#: ../../library/argparse.rst:518
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 ""
"Os argumentos lidos de um arquivo devem, por padrão, ser um por linha (mas "
"veja também :meth:`~ArgumentParser.convert_arg_line_to_args`) e são tratados "
"como se estivessem no mesmo lugar que o argumento de referência do arquivo "
"original na linha de comando. Portanto, no exemplo acima, a expressão ``['-"
"f', 'foo', '@args.txt']`` é considerada equivalente à expressão ``['-f', "
"'foo', '-f', 'bar']``."
#: ../../library/argparse.rst:524
msgid ""
"The ``fromfile_prefix_chars=`` argument defaults to ``None``, meaning that "
"arguments will never be treated as file references."
msgstr ""
"O argumento ``fromfile_prefix_chars=`` é padronizado como ``None``, "
"significando que os argumentos nunca serão tratados como referências de "
"arquivo."
#: ../../library/argparse.rst:529
msgid "argument_default"
msgstr "argument_default"
#: ../../library/argparse.rst:531
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 ""
"Geralmente, os padrões dos argumentos são especificados passando um padrão "
"para :meth:`~ArgumentParser.add_argument` ou chamando os métodos :meth:"
"`~ArgumentParser.set_defaults` com um conjunto específico de pares nome-"
"valor. Às vezes, no entanto, pode ser útil especificar um único padrão para "
"todo o analisador para argumentos. Isso pode ser feito passando o argumento "
"nomeado ``argument_default=`` para :class:`ArgumentParser`. Por exemplo, "
"para suprimir globalmente a criação de atributos em chamadas :meth:"
"`~ArgumentParser.parse_args`, fornecemos ``argument_default=SUPPRESS``::"
#: ../../library/argparse.rst:551
msgid "allow_abbrev"
msgstr "allow_abbrev"
#: ../../library/argparse.rst:553
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, quando você passa uma lista de argumentos para o método :meth:"
"`~ArgumentParser.parse_args` de um :class:`ArgumentParser`, ele :ref:"
"`reconhece as abreviações <prefix-matching>` de opções longas."
#: ../../library/argparse.rst:557
msgid "This feature can be disabled by setting ``allow_abbrev`` to ``False``::"
msgstr ""
"Este recurso pode ser desabilitado configurando ``allow_abbrev`` para "
"``False``::"
#: ../../library/argparse.rst:570
msgid "conflict_handler"
msgstr "conflict_handler"
#: ../../library/argparse.rst:572
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 ""
"Objetos :class:`ArgumentParser` não permitem duas ações com a mesma string "
"de opções. Por padrão, objetos :class:`ArgumentParser` levantam uma exceção "
"se for feita uma tentativa de criar um argumento com uma string de opção que "
"já esteja em uso::"
#: ../../library/argparse.rst:584
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 ""
"Às vezes (por exemplo, ao usar os parents_) pode ser útil simplesmente "
"substituir quaisquer argumentos mais antigos com a mesma string de opções. "
"Para obter este comportamento, o valor ``'resolve'`` pode ser fornecido ao "
"argumento ``conflict_handler=`` de :class:`ArgumentParser`::"
#: ../../library/argparse.rst:600
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 ""
"Observe que os objetos :class:`ArgumentParser` só removem uma ação se todas "
"as suas strings de opção forem substituídas. Assim, no exemplo acima, a "
"antiga ação ``-f/--foo`` é mantida como a ação ``-f``, porque apenas a "
"string de opção ``--foo`` foi substituída."
#: ../../library/argparse.rst:607
msgid "add_help"
msgstr "add_help"
#: ../../library/argparse.rst:609
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 padrão, os objetos ArgumentParser adicionam uma opção que simplesmente "
"exibe a mensagem de ajuda do analisador. Por exemplo, considere um arquivo "
"chamado ``myprogram.py`` contendo o seguinte código::"
#: ../../library/argparse.rst:618
msgid ""
"If ``-h`` or ``--help`` is supplied at the command line, the ArgumentParser "
"help will be printed:"
msgstr ""
"Se ``-h`` ou ``--help`` for fornecido na linha de comando, a ajuda do "
"ArgumentParser será impressa:"
#: ../../library/argparse.rst:630
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 ""
"Às vezes, pode ser útil desabilitar o acréscimo desta opção de ajuda. Isto "
"pode ser feito passando ``False`` como o argumento ``add_help=`` para a "
"classe :class:`ArgumentParser`::"
#: ../../library/argparse.rst:642
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 ""
"A opção de ajuda é normalmente ``-h/--help``. A exceção a isso é se o "
"``prefix_chars=`` for especificado e não incluir ``-``, neste caso ``-h`` e "
"``--help`` não são opções válidas. Neste caso, o primeiro caractere em "
"``prefix_chars`` é usado para prefixar as opções de ajuda::"
#: ../../library/argparse.rst:657
msgid "exit_on_error"
msgstr "exit_on_error"
#: ../../library/argparse.rst:659
msgid ""
"Normally, when you pass an invalid argument list to the :meth:"
"`~ArgumentParser.parse_args` method of an :class:`ArgumentParser`, it will "
"exit with error info."
msgstr ""
"Normalmente, quando você passa uma lista de argumentos inválidos para o "
"método :meth:`~ArgumentParser.parse_args` de um :class:`ArgumentParser`, ele "
"sairá com informações de erro."
#: ../../library/argparse.rst:662
msgid ""
"If the user would like to catch errors manually, the feature can be enabled "
"by setting ``exit_on_error`` to ``False``::"
msgstr ""
"Se o usuário quiser detectar erros manualmente, o recurso pode ser "
"habilitado configurando ``exit_on_error`` para ``False``::"
#: ../../library/argparse.rst:679
msgid "The add_argument() method"
msgstr "O método add_argument()"
#: ../../library/argparse.rst:685
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 como um único argumento de linha de comando deve ser analisado. Cada "
"parâmetro tem sua própria descrição mais detalhada abaixo, mas resumidamente "
"são eles:"
#: ../../library/argparse.rst:688
msgid ""
"`name or flags`_ - Either a name or a list of option strings, e.g. ``foo`` "
"or ``-f, --foo``."
msgstr ""
"`name ou flags`_ - Um nome ou uma lista de strings de opções, por exemplo. "
"``foo`` ou ``-f, --foo``."
#: ../../library/argparse.rst:691
msgid ""
"action_ - The basic type of action to be taken when this argument is "
"encountered at the command line."
msgstr ""
"action_ - O tipo básico de ação a ser executada quando esse argumento é "
"encontrado na linha de comando."
#: ../../library/argparse.rst:694
msgid "nargs_ - The number of command-line arguments that should be consumed."
msgstr ""
"nargs_ - O número de argumentos de linha de comando que devem ser consumidos."
#: ../../library/argparse.rst:696
msgid ""
"const_ - A constant value required by some action_ and nargs_ selections."
msgstr ""
"const_ - Um valor constante exigido por algumas seleções action_ e nargs_."
#: ../../library/argparse.rst:698
msgid ""
"default_ - The value produced if the argument is absent from the command "
"line and if it is absent from the namespace object."
msgstr ""
"default_ - O valor produzido se o argumento estiver ausente da linha de "
"comando e se estiver ausente do objeto espaço de nomes."
#: ../../library/argparse.rst:701
msgid ""
"type_ - The type to which the command-line argument should be converted."
msgstr ""
"type_ - O tipo para o qual o argumento de linha de comando deve ser "
"convertido."
#: ../../library/argparse.rst:703
msgid "choices_ - A container of the allowable values for the argument."
msgstr ""
#: ../../library/argparse.rst:705
msgid ""
"required_ - Whether or not the command-line option may be omitted (optionals "
"only)."
msgstr ""
"required_ - Se a opção de linha de comando pode ou não ser omitida (somente "
"opcionais)."
#: ../../library/argparse.rst:708
msgid "help_ - A brief description of what the argument does."
msgstr "help_ - Uma breve descrição do que o argumento faz."
#: ../../library/argparse.rst:710
msgid "metavar_ - A name for the argument in usage messages."
msgstr "metavar_ - Um nome para o argumento nas mensagens de uso."
#: ../../library/argparse.rst:712
msgid ""
"dest_ - The name of the attribute to be added to the object returned by :"
"meth:`parse_args`."
msgstr ""
"dest_ - O nome do atributo a ser adicionado ao objeto retornado por :meth:"
"`parse_args`."
#: ../../library/argparse.rst:719
msgid "name or flags"
msgstr "name ou flags"
#: ../../library/argparse.rst:721
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 ""
"O método :meth:`~ArgumentParser.add_argument` define quando um argumento "
"opcional, como ``-f`` ou ``--foo``, ou um argumento posicional, como uma "
"lista de nomes de arquivos, é esperada. Os primeiros argumentos passados ao "
"método :meth:`~ArgumentParser.add_argument` devem ser uma série de flags, ou "
"um simples nome de argumento. Por exemplo, um argumento opcional deve ser "
"criado como::"
#: ../../library/argparse.rst:730
msgid "while a positional argument could be created like::"
msgstr "enquanto um argumento posicional pode ser criado como::"
#: ../../library/argparse.rst:734
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 ""
"Quando :meth:`~ArgumentParser.parse_args` é chamado, argumentos opcionais "
"serão identificados pelo prefixo ``-``, e os argumentos restantes serão "
"considerados posicionais::"
#: ../../library/argparse.rst:751
msgid "action"
msgstr "ação"
#: ../../library/argparse.rst:753
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 ""
"Objetos :class:`ArgumentParser` associam argumentos de linha de comando com "
"ações. Essas ações podem fazer praticamente qualquer coisa com os argumentos "
"de linha de comando associados a elas, embora a maioria das ações "
"simplesmente adicione um atributo ao objeto retornado por :meth:"
"`~ArgumentParser.parse_args`. O argumento nomeado ``action`` especifica como "
"os argumentos da linha de comando devem ser tratados. As ações fornecidas "
"são:"
#: ../../library/argparse.rst:759
msgid ""
"``'store'`` - This just stores the argument's value. This is the default "
"action. For example::"
msgstr ""
"``'store'`` - Isso apenas armazena o valor do argumento. Esta é a ação "
"padrão. Por exemplo::"
#: ../../library/argparse.rst:767
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'`` - Isso armazena o valor especificado pelo argumento "
"nomeado const_. A ação ``'store_const'`` é mais comumente usada com "
"argumentos opcionais que especificam algum tipo de sinalizador. Por exemplo::"
#: ../../library/argparse.rst:776
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'`` e ``'store_false'`` - Estes são casos especiais de "
"``'store_const'`` usados para armazenar os valores ``True`` e ``False`` "
"respectivamente. Além disso, eles criam valores padrão de ``False`` e "
"``True`` respectivamente. Por exemplo::"
#: ../../library/argparse.rst:788
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'`` - Isso armazena uma lista e anexa cada valor de argumento à "
"lista. Isso é útil para permitir que uma opção seja especificada várias "
"vezes. Exemplo de uso::"
#: ../../library/argparse.rst:797
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'`` - Isso armazena uma lista e anexa o valor especificado "
"pelo argumento nomeado const_ à lista. (Observe que o argumento nomeado "
"const_ tem como padrão ``None``.) A ação ``'append_const'`` é normalmente "
"útil quando vários argumentos precisam armazenar constantes na mesma lista. "
"Por exemplo::"
#: ../../library/argparse.rst:809
msgid ""
"``'count'`` - This counts the number of times a keyword argument occurs. For "
"example, this is useful for increasing verbosity levels::"
msgstr ""
"``'count'`` - Isso conta o número de vezes que um argumento nomeado ocorre. "
"Por exemplo, isso é útil para aumentar os níveis de verbosidade::"
#: ../../library/argparse.rst:817
msgid "Note, the *default* will be ``None`` unless explicitly set to *0*."
msgstr ""
"Observe que o *padrão* será ``None``, a menos que seja explicitamente "
"definido como *0*."
#: ../../library/argparse.rst:819
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'`` - Isso imprime uma mensagem de ajuda completa para todas as "
"opções no analisador sintático atual e sai. Por padrão, uma ação de ajuda é "
"adicionada automaticamente ao analisador sintático. Veja :class:"
"`ArgumentParser` para detalhes de como a saída é criada."
#: ../../library/argparse.rst:824
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'`` - Isso espera um argumento nomeado ``version=`` na chamada :"
"meth:`~ArgumentParser.add_argument` e imprime informações de versão e sai "
"quando invocado::"
#: ../../library/argparse.rst:834
msgid ""
"``'extend'`` - This stores a list, and extends each argument value to the "
"list. Example usage::"
msgstr ""
"``'extend'`` - Isso armazena uma lista e estende cada valor de argumento "
"para a lista. Exemplo de uso::"
#: ../../library/argparse.rst:845
msgid ""
"You may also specify an arbitrary action by passing an Action subclass or "
"other object that implements the same interface. The "
"``BooleanOptionalAction`` is available in ``argparse`` and adds support for "
"boolean actions such as ``--foo`` and ``--no-foo``::"