sudasana / armcom2

Armoured Commander II
104 stars 13 forks source link

Python 3 #4

Closed Stew-rt closed 5 years ago

Stew-rt commented 6 years ago

Would you be willing to accept a pull request upgrading the code to use python 3?

sudasana commented 6 years ago

Actually I was planning on upgrading the master branch to Python 3! I just need to confirm that all the packages I use are compatible, but if everything looks good then I will upgrade.

Stew-rt commented 6 years ago

2to3 works fine on armcom2.py - the only bits I found that didn't automatically convert where xp_loader.py and libtcod.py. where I had to manually change some ".encode.hex" parts to "binascii.b2a_hex(some_var)"

sudasana commented 6 years ago

Excellent - both of those packages allow modifications so that should not be a problem either.

sudasana commented 6 years ago

I did a quick initial conversion to run under Python 3, it's far from finished but it will boot to the main menu now. There's still some work to be done in how strings are handled (crew names are messed up) and in switching to different ways of accessing dictionary keys.

sudasana commented 6 years ago

I've been running the current version on Python 3.6.6 (in order to maintain compatibility with PyInstaller) and have not encountered any more crashes. There's probably a few leftover incompatible functions still to discover but I will fix them as I find them.

sudasana commented 5 years ago

Has been running well on Python 3 for some time now.