A Python interface for NEURON using ctypes
Posted: Mon Jul 07, 2014 6:19 pm
Long ago I suggested the possibility of developing a Python interface for NEURON based on the built-in ctypes package. The main advantages would be:
1) it would no longer be necessary to compile the NEURON+Python bindings; instead Python would just directly access the NEURON shared library. This also means that NEURON could be made to work with any version of Python on any operating system, without having to provide precompiled binaries for that combination (or expect the user to compile it themselves).
2) The Python interface would be written in pure python which would make it much easier to develop (especially for folks like me who struggled to understand the C internals of NEURON). This might allow some of the rough edges in the Python API to be worked through more quickly.
The only requirement would be that NEURON provides an external C API. I spent some time poking at the code and never quite understood what was needed to make this happen.. My questions are: Is development of a C API still in the planning for NEURON, and if so, would there be interest in developing a pure-Python interface? I would be willing to put some effort toward the Python end, but only if the developers think this is a worthwhile goal.
1) it would no longer be necessary to compile the NEURON+Python bindings; instead Python would just directly access the NEURON shared library. This also means that NEURON could be made to work with any version of Python on any operating system, without having to provide precompiled binaries for that combination (or expect the user to compile it themselves).
2) The Python interface would be written in pure python which would make it much easier to develop (especially for folks like me who struggled to understand the C internals of NEURON). This might allow some of the rough edges in the Python API to be worked through more quickly.
The only requirement would be that NEURON provides an external C API. I spent some time poking at the code and never quite understood what was needed to make this happen.. My questions are: Is development of a C API still in the planning for NEURON, and if so, would there be interest in developing a pure-Python interface? I would be willing to put some effort toward the Python end, but only if the developers think this is a worthwhile goal.