changes to run under python2.
Merge pull request #2 from birkin/master

changes to run under python2.