Python – argparse

Documentation here.

argparse

The interesting part is after you pass the variables to the parser and finished parsing the arguments. The result will be stored in a namespace object, where you can either call the members inside that namespace by calling args.input/args.output like calling an object attribute, or you can use the `vars` command to turn the namespace into a dictionary to work with.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s