updated for python 2.x or 3.x

will run with either code now without error
Merge pull request #1 from splinterific/master

updated for python 2.x or 3.x