Newbie ARGPARSE question

2018-04-17 Thread TUA
I just discovered ARGPARSE 5 minutes ago and cannot figure this one out: What does the Parser.add_argument() call have to look like when I need an option 'add' that requires the mandatory parameters 'type' (string), 'size' (int), 'sid' (string) and must also handle the optional parameters 'commen

Re: argparse question

2014-02-22 Thread Larry Hudson
On 02/22/2014 03:58 AM, Peter Otten wrote: Larry Hudson wrote: I have been reading the argparse section of the 3.3 docs, and running all the example code. But in section 16.4.2.6. for the formatter_class, the second example in that section illustrating RawDescriptionHelpFormatter, the example

Re: argparse question

2014-02-22 Thread Peter Otten
Larry Hudson wrote: > I have been reading the argparse section of the 3.3 docs, and running all > the example code. > > But in section 16.4.2.6. for the formatter_class, the second example in > that section illustrating RawDescriptionHelpFormatter, the example code > is: > > parser = argparse.Ar

argparse question

2014-02-22 Thread Larry Hudson
I have been reading the argparse section of the 3.3 docs, and running all the example code. But in section 16.4.2.6. for the formatter_class, the second example in that section illustrating RawDescriptionHelpFormatter, the example code is: parser = argparse.ArgumentParser( prog='PROG',