Make the code compatible with Python 2 and 3
Code converted with https://python-future.org plus a couple of minor modifications.
Closes #112 (closed)
Code converted with https://python-future.org plus a couple of minor modifications.
Closes #112 (closed)