Last active
October 17, 2019 13:56
-
-
Save tamsanh/17f6e135bdcdcccb5f877531ca909ad6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Argument Parser that prints its help message by default | |
import argparse | |
import sys | |
class HelpDefaultParser(argparse.ArgumentParser): | |
def error(self, message): | |
sys.stderr.write('error: %s\n' % message) | |
self.print_help() | |
sys.exit(2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment