Dear AFNI team,
Recently, I realize that using AFNI by writing ipython script (*.ipy) is highly enjoyable compared with tcsh or bash scripts,
except for the Python 2/3 compatibility issue.
Although Python 2 and 3 have been running in parallel for a long time, but currently I feel the migrating speed toward Python 3 is accelerating.
For example,
1) Python 2.7 stops to get feature back port.
2) Most popular packages have already been 2/3 compatible.
3) Some major packages (e.g., IPython) start to maintain Python 3 only code base.
I personally find Python 3 quite convenient to work with, given the accumulating new language features.
So I have Python 3 installed on my computer as the default Python interpreter.
Unfortunately, the Python-related code in AFNI only works with Python 2.
In order to use AFNI smoothly, I have to switch to Python 2 manually each time.
In fact, it is usually quit easy to refactor the code to make it compatible with both Python 2 and 3.
For example, one prominent issue that currently prevents the scripts from running with Python 3 is the ubiquitous
print "some message"
To be 2/3 compatible, simply change it into
print("some message")
For more involved cases, there is a single file package called "six" which provides a compatibility layer.
There is also tools to automate such translations.
Will you consider refactoring the python code to also support Python 3?
It will be truly appreciated and I will also be happy if there is anything I can help~
Thanks,