knaughten / mitgcm_python

Python scripts designed for my Weddell Sea and Amundsen Sea configurations of MITgcm.
25 stars 17 forks source link

"Print" statements return syntax errors #2

Closed DaniJonesOcean closed 2 years ago

DaniJonesOcean commented 3 years ago

When using Python 3.7.3, the "print" statements throughout the code return syntax errors. These errors vanish when using older versions of Python, e.g. 2.7.14. From what I understand, these

I found one possible solution here:

https://stackoverflow.com/questions/17871086/vim-regex-for-python2-print-to-python3?noredirect=1&lq=1

I guess that should work for the print statements, but it won't help with other compatibility issues. Let me know what you think!

knaughten commented 3 years ago

Hi Dan, just to let you know I have started the process of moving to python3 (finally - I held out as long as I could!!) This should fix the print statement issue. I have created a legacy branch "python2" which you can switch to if needed. Hopefully I'll sort this all today...

DaniJonesOcean commented 2 years ago

Hi Kaitlin - just looking at old issues.

I never closed this one! I haven't checked to see if this works, but I'll close it for now since you've migrated over.