Skip to content

Instantly share code, notes, and snippets.

@alanyee
Created October 21, 2019 02:40
Show Gist options
  • Save alanyee/14d274f1f9a0f4765447bc517bbff6bb to your computer and use it in GitHub Desktop.
Save alanyee/14d274f1f9a0f4765447bc517bbff6bb to your computer and use it in GitHub Desktop.
Suppress help from usage statement
import argparse
parser = argparse.ArgumentParser(prog='PROG', add_help=False)
parser.add_argument('--help', '-h', action='help', help=argparse.SUPPRESS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment