This may deviate significantly from your intentions but I wanted to install this via PIP so I moved it from a single file into a module with a setup script to allow installation.
Some early commits: 6306903, 9fcf29e, ec0001a, b364362 fix some misspellings and remove some semicolons. One of those commits introduced a random character at the end of a comment which I removed in b5902f1.
I validated the file using pyflake and made some edits to get it closer to passing in e634e62, 682e158, 71767e6. Specifically setting the encoding to UTF-8 and shortening line lengths as well as removing blank spaces at the end of lines. I left the var names alone as I wanted to have some unit or doctest to compare before and after.
This may deviate significantly from your intentions but I wanted to install this via PIP so I moved it from a single file into a module with a setup script to allow installation.
Some early commits: 6306903, 9fcf29e, ec0001a, b364362 fix some misspellings and remove some semicolons. One of those commits introduced a random character at the end of a comment which I removed in b5902f1.
I validated the file using pyflake and made some edits to get it closer to passing in e634e62, 682e158, 71767e6. Specifically setting the encoding to UTF-8 and shortening line lengths as well as removing blank spaces at the end of lines. I left the var names alone as I wanted to have some unit or doctest to compare before and after.