- Timestamp:
- 05/25/11 19:48:33 (12 months ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
examples/nineml_neuron.py (modified) (2 diffs)
-
src/neuron/nineml.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/nineml_neuron.py
r965 r966 5 5 6 6 import sys 7 from os.path import abspath, realpath, join8 7 import nineml 9 root = abspath(join(realpath(nineml.__path__[0]), "../../.."))10 sys.path.append(join(root, "lib9ml/python/examples/AL"))11 sys.path.append(join(root, "code_generation/nmodl"))12 leaky_iaf = __import__("leaky_iaf")13 coba_synapse = __import__("coba_synapse")14 8 import pyNN.neuron as sim 15 9 from pyNN.neuron.nineml import nineml_cell_type … … 20 14 init_logging(None, debug=True) 21 15 sim.setup(timestep=0.1, min_delay=0.1, max_delay=2.0) 16 17 18 # Get come models to work with 19 from nineml.examples.AL import leaky_iaf 20 from nineml.examples.AL import coba_synapse 22 21 23 22 celltype_cls = nineml_cell_type("if_cond_exp", -
trunk/src/neuron/nineml.py
r965 r966 95 95 logger.debug("Writing NineML component to %s" % xml_file) 96 96 nineml_component.write(xml_file) 97 98 # TODO: This way of importing is a cludge. 99 # To fix it, where should general nmodl code-generation live? Under nineml.code_generation ? 100 from os.path import abspath, realpath, join 101 import nineml, sys 102 root = abspath(join(realpath(nineml.__path__[0]), "../../..")) 103 sys.path.append(join(root, "code_generation/nmodl")) 97 104 nineml2nmodl = __import__("9ml2nmodl") 105 98 106 nineml2nmodl.write_nmodl(xml_file, weight_variables) # weight variables should really come from xml file 99 107 p = subprocess.check_call(["nrnivmodl"])
