Tutorial #1 from PyCon AU 2012 Python is a fantastic scripting language. It is easy to hack up quick scripts for all sorts of problems - without a lot more effort, that hack can become a robust, easily maintained command line application that your users love. This tutorial covers how to write useful, well-behaved command line applications that are a joy to use: * Easily process command line options * Write a script that can be used interactively or as a filter * Display help to the user * Gracefully handle and report errors, to the user and the shell * Trap and process signals in a robust manner * Create an easily configured application * Use a range of the Python standard library modules for easier command line scripting * Test your application * Set up the supporting files that any well-behaved application should have, eg. a man page * How to package your application for other people to use This tutorial will assume a very basic knowledge of Python and some familiarity with the command line environment of your choice.