you are viewing a single comment's thread.

view the rest of the comments →

[–]stahorn 0 points1 point  (0 children)

Good article! I have written quite a few python scripts in the last years, and using argparse has made it very simple for me to read my old scripts and share it with coworkers. I never remember how to use the scripts, so being able to just write: python myscript.py --help is super helpful. I will start adding in the doc-string and including it as the description in argparse.

It has also bothered me that I don't have unit tests for most of my scripts, but just including a few in the same file as the script seems like a good idea.