I like to put the main logic in a `main` function, using the template from Guido van Rossum, at the bottom of [this page](http://www.artima.com/weblogs/viewpost.jsp?thread=4829)