Page 1 of 1

.mod files with python

Posted: Mon Feb 08, 2010 8:41 am
by anna
Hi!
How do I get to compile .mod files into .dll ones while using NEURON as a python module?
(I am working on OS X, does it change anything?)
I saw there were posts concerning .mod files, but couldn't find anything related to my problem.
Thanks a lot,
Anna

Re: .mod files with python

Posted: Mon Feb 08, 2010 11:16 am
by ted
Described in the FAQ list. At NEURON's Documentation page
http://www.neuron.yale.edu/neuron/docs
click on the "FAQ" link, and look for the item
How do I compile mod files?

Re: .mod files with python

Posted: Tue Feb 09, 2010 4:17 am
by anna
Good morning
Well, I tried to start Python, and then to import NEURON, as usual, while being in the directory of my .mod files. Then I typed "nrnivmodl"
However this gives me the following message:
"NameError: name 'nrnivmodl' is not defined"
On the other hand you write in your answer: "This assumes you have /Applications/NEURON-X.X/nrn/i386/bin in your PATH (substitute the version number for the X.X)." Does it also make sense when NEURON was installed using Eilif Müller's pre-built installer for NEURON 7.0 and Enthought Python?
Thank you very much,
Anna

Re: .mod files with python

Posted: Tue Feb 09, 2010 9:25 am
by ted
anna wrote:I tried to start Python, and then to import NEURON, as usual, while being in the directory of my .mod files.
Compile the mod files before doing anything else. NEURON loads the compiled objects when it starts. If you start NEURON before compiling the mod files, there won't be anything for NEURON to load.
Then I typed "nrnivmodl"
nrnivmodl is a standalone program, not part of the NEURON or Python namespaces. Run it from the command line in an xterm.