Python3 etc

As an exercise after the python 2 to 3 talk at PyCon (go watch http://pyvideo.org/video/2626/by-your-bootstraps-porting-your-application-to-p ), I thought I'd work on portability for this simple module.