mgaitan / fortran_magic

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

NameError with Python 3.3 #6

Closed rcrehuet closed 10 years ago

rcrehuet commented 10 years ago

Hi, I have installed fortran-magic-0.4.2 on a system with IPython 1.1.0 and Python 3.3.2. When I run the example in the python notebook I get the error:

/home/ramon/.config/ipython/extensions/fortranmagic.py in <listcomp>(.0)
    304 
    305         kw = ['--%s=%s' % (k, v) for k, v in vars(args).items()
--> 306               if isinstance(v, basestring)]
    307         f2py_args.extend(kw)
    308 

NameError: global name 'basestring' is not defined

I guess this is because basestring is no longer defined in python3. Here is a possible solution: http://www.rfk.id.au/blog/entry/preparing-pyenchant-for-python-3/

mgaitan commented 10 years ago

thanks for the report. I'll fix it asap.