mgaitan / fortran_magic

An extension for IPython/Jupyter that helps to use Fortran in your interactive session.
BSD 3-Clause "New" or "Revised" License
117 stars 32 forks source link

Cross compatibility with older NumPy and Python 3 #16

Closed QuLogic closed 8 years ago

QuLogic commented 8 years ago

NumPy 1.10 is pretty new and not available in most distro packages, so use f2py3/f2py when it's older. Also, calling python does not guarantee the correct result because it's usually a symlink to python2 (in accordance with the PEP), so compiles still use the wrong version. With sys.executable, you'd run with exactly the same interpreter as the notebook kernel is using.

Also, I'm not really sure why it needs to be modifying sys.argv since it's Popening some other process anyway, but I didn't make any changes there as I'm not too sure about it.