Python·100 questions

How to use argparse for command-line arguments?

Answer
parser = argparse.ArgumentParser().
parser.add_argument('--path', required=True).
args = parser.parse_args().
Support subcommands: add_subparsers().
Auto-generate help.
Was this answer helpful?

More questions in this topic

Related questions from other topics