suppressing argparse arguments in the help

Discussion in 'Python' started by Andrea Crotti, Feb 28, 2012.

  1. 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?
     
    Andrea Crotti, Feb 28, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Elliot M. Rodriguez

    suppressing Submit command with a Delete button

    Elliot M. Rodriguez, Dec 16, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    449
    Elliot M. Rodriguez
    Dec 17, 2003
  2. =?Utf-8?B?S2VubmV0aCBQ?=

    Suppressing the URL in a asp.net app

    =?Utf-8?B?S2VubmV0aCBQ?=, Nov 4, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    725
    =?Utf-8?B?S2VubmV0aCBQ?=
    Dec 24, 2004
  3. Johannes Bauer
    Replies:
    0
    Views:
    164
    Johannes Bauer
    Nov 20, 2012
  4. Roy Smith
    Replies:
    2
    Views:
    178
    Ian Kelly
    Nov 24, 2012
  5. Marco
    Replies:
    3
    Views:
    146
Loading...

Share This Page