This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.
How I use argparse. Basic main() stub import argparse import sys _examples = '''examples: # Run x, y, z python %(prog)s --output=tmp ''' def main(): parser = argparse.ArgumentParser( description = 'Argparse test' , epilog = _examples, formatter_class = argparse.RawDescriptionHelpFormatter ) parser.add_argument( '--output' , help = 'Specify output dir' ) args = parser.parse_args() print ( vars…
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.