A Canonical Form for Command-Line Programs — Python 3 Patterns, Recipes and Idioms (original) (raw)
- Docs »
- A Canonical Form for Command-Line Programs
- Edit on Bitbucket
Creating Python programs for command-line use involves a certain amount of repetitious coding, which can often be left off or forgotten. Here is a form which includes everything.
Note that if you are using Windows, you can add Python programs to your “File New” menu and automatically include the above text in the new file. This articleshows you how. Other operating systems have their own automation features.