Calling python from hoc

When Python is the interpreter, what is a good
design for the interface to the basic NEURON
concepts.

Moderator: hines

Post Reply
aluchko

Calling python from hoc

Post by aluchko »

I'm writing some optimizers and was hoping to see what it was like writing them in python. The issue is that in order to integrate this code into the neuron gui at some point a call from hoc to python needs to occur. I was wondering if there were any examples of this anywhere?
ted
Site Admin
Posts: 6289
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Calling python from hoc

Post by ted »

aluchko wrote:I'm writing some optimizers and was hoping to see what it was like writing them in python.
Excellent!
at some point a call from hoc to python needs to occur. I was wondering if there were any examples of this anywhere?
The Programmer's Reference provides some examples
http://www.neuron.yale.edu/neuron/stati ... ing_Python
and you may find some others in
Hines, M.L., Davison, A.P. and Muller, E. NEURON and Python. Frontiers in Neuroinformatics 3:10.3389/neuro.11.001.2009, 2009
and maybe also in
Davison, A. P., Hines, M. L. and Muller, E.. Trends in programming languages for neuroscience simulations. Frontiers in Neuroscience 3:374-380, 2009
(although I seem to recall the latter was more of an endorsement of Python for new code development).
aluchko

Re: Calling python from hoc

Post by aluchko »

Thanks, those docs really helped.
Post Reply