Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > suppressing argparse arguments in the help

Reply
Thread Tools

suppressing argparse arguments in the help

 
 
Andrea Crotti
Guest
Posts: n/a
 
      02-28-2012
I have a script that might be used interactively but also has some
arguments that
should not be used by "normal" users.
So I just want to suppress them from the help.
I've read somewhere that the help=SUPPRESS should do what I want:

parser.add_argument('-n', '--test_only',
action='store_true',
help=SUPPRESS)

but that's what I get from "myapp -h", which is not exactly what I was
looking for..


-f, --first_level ==SUPPRESS== (default: False)
--never_redevelop ==SUPPRESS== (default: False)


Any other solutions?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Required arguments in argparse: at least one of a group Marco Python 3 03-24-2013 09:41 PM
argparse -- mutually exclusive sets of arguments? Roy Smith Python 2 11-24-2012 01:07 AM
Greedy parsing of argparse/positional arguments Johannes Bauer Python 0 11-20-2012 10:02 AM
argparse: showing full help for subparsers Chris Withers Python 0 08-31-2011 11:57 AM
Customize help output from optparse (or argparse) Thorsten Kampe Python 3 05-21-2011 09:53 PM



Advertisments