A few very simple examples of using argparse for:
- flag parameters
- lists of things
- calling an app with all paramaters
The files are:
very basic - a single positional argument
a multi-valued argument - passes a list to the app. Use with wildcards on linux to return (potentially huge) lists of files
adds in flag type arguments which result in True or False (and can work either way round
getting arguments parsed (e.g. as int or float)
using your own functions to validate and process a parameter
a simple trick to pass all aruments as keywords to the function
A very simple calculator with it's own unique syntax!