L0laapk3 / FactorioMaps

L0laapk3's FactorioMaps mod
https://mods.factorio.com/mod/L0laapk3_FactorioMaps
Other
121 stars 22 forks source link

python2 runtime failure #13

Closed OvermindDL1 closed 5 years ago

OvermindDL1 commented 5 years ago
  File "auto.py", line 24
    print("\r{}{}".format(arg, " " * (tsiz-len(arg))), end="\r\n" if tsiz <= len(arg) else "")
                                                          ^
SyntaxError: invalid syntax

This part works with python3 however.

L0laapk3 commented 5 years ago

If you're using the latest commits, I have completely dropped python 2 in favor of python 3.

OvermindDL1 commented 5 years ago

I am indeed using the dev branch, however it's readme was still speaking of python2, and I quote:

  1. Install the latest version of python 2.7. (Do not install python 3.)

:-)

OvermindDL1 commented 5 years ago

Consequently when using python 3 then instead of the commands like python auto.py savename instead python3 should be used like python3 auto.py savename because calling python will call the system default where calling python2 or python3 will call 2 or 3 respectively. :-)

L0laapk3 commented 5 years ago

I should have taken care of that already as of 2bea5b85334a5723cb030eb636614186755329e0, and in the dev branch I've taken it even further by actually properly importing those functions instead of just lazily calling them. If theres still a problem in those versions, let me know. :)

OvermindDL1 commented 5 years ago

Yep, that fixes those issues, the issue in the dev branch has with python2 is that an unsupported keyword argument was passed into the print call, a 3.x feature only. I'm perfectly good with dropping python2 support though, it's ancient.