I'm trying to get dolfin to run with python 3. Previously this summer I
have changed ffc, fiat, instant and ufl, which are now included in the
master/next branches.

Dolfin now builds for python 2 and 3, but for python 3 it fails to import
from dolfin. You can find my code her:
https://bitbucket.org/aslakbergersen/dolfin/branch/aslakbergersen/topic-prepare-py3

'''
Traceback (most recent call last):
  File "errorcontrol.py", line 26, in <module>
    from dolfin import *
  File
"/home/aslak/Work/FEniCS/install_dir_py3/lib/python3.2/site-packages/dolfin/__init__.py",
line 16, in <module>
    from . import cpp
  File
"/home/aslak/Work/FEniCS/install_dir_py3/lib/python3.2/site-packages/dolfin/cpp/__init__.py",
line 42, in <module>
    exec("from . import %s" % module_name)
  File "<string>", line 1, in <module>
  File
"/home/aslak/Work/FEniCS/install_dir_py3/lib/python3.2/site-packages/dolfin/cpp/common.py",
line 2458, in <module>
    class Event(object):
  File
"/home/aslak/Work/FEniCS/install_dir_py3/lib/python3.2/site-packages/dolfin/cpp/common.py",
line 2473, in Event
    thisown = _swig_property(lambda x: x.this.own(), lambda x, v:
x.this.own(v), doc='The membership flag')
  File
"/home/aslak/Work/FEniCS/install_dir_py3/lib/python3.2/site-packages/dolfin/cpp/common.py",
line 2093, in __setitem__
    if key not in self._get_parameter_keys():
TypeError: in method 'Parameters__get_parameter_keys', argument 1 of type
'dolfin::Parameters const *
'''

There seems to be an error whith swig and the new C API for python. I'm
using python 3.2 and swig 3.0.2. Does anyone have experience with this type
of error?

-- 
Mvh
Aslak Bergersen
993 22 848
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to