Tidy up python a bit.
Merge pull request #112 from csmith/master

Tidy up python a bit.