geophysics / MoPaD

the MoPaD repository
GNU Lesser General Public License v3.0
21 stars 20 forks source link

updated mopad.py to python3 compatible with 2to3 #5

Open cossatot opened 9 years ago

cossatot commented 9 years ago

Hey y'all, I've converted MoPaD to python 3 compatibility. Thanks for making the awesome tool!

QuLogic commented 9 years ago

If you're going to use the print function, then you should from __future__ import print_function, or else you'll get the issue that resulted in the second commit here.

cossatot commented 9 years ago

Yeah, I understand the problem. I didn't closely inspect the output from 2to3 before committing; I expected 2to3 to automatically produce code that would be compatible with both. Nonetheless, getting rid of the end=' 's still cleans things up a bit.

QuLogic commented 9 years ago

Yes, but I mean you should add it anyway. Unless you're aiming for compatibility with Python 2.5 (which is ancient), there's no reason not to do so, and it will reduce the chance of the same confusion occurring with some other developer later on.