Python 3 compatibility, command line parsing