Simple CLI Script with Argparse
Let’s face it, most of the Python programs we write are going to be used from the command line. There are tons of command line interface helper libraries out there. My preferred CLI method is the style of Django’s management utility. More on this later, when we hopefully publish a library that gives us that out of the box (we use it in many of our projects already). Sometimes though, you just want a simple CLI script. These days we use the standard library argparse module to parse commands off the command line. Here is my basic script that I use for most of my projects: ...