Closed brian-rose closed 5 years ago
@ddbkoll you should take a careful look before merging, I may easily have broken something.
I verified that the two test scripts in the repository will now both run (and seem to produce the same result) under Python 2.7 and 3.7.
But there is probably a lot of code that these test scripts do not touch.
Oh, I forgot one other change.
The string methods string.atof()
and string.atoi()
are replaced with simple built-in conversions float()
and int()
.
Those methods were deprecated in Python 2 some time ago and totally absent from Python 3.
Closes #7
Makes stuff work on both Python 2.7 and Python 3.x
Key changes:
future
package for interoperability. Most of the modules now haveat the beginning. This makes Python 2.7 code work the same as it does in Python 3.
print
statements are changed toprint()
functionsimport somemodule
statements are changed to the explicit style/
on integers. In Python 2 this returns a truncatedint
, while in Python 3 it always returns afloat
. I didn't see any usage of integer division in the code, but you have a careful look.Finally I included a
.gitignore
file in the repository to simplify the version control of code while excluding compiled objects.