Skip to content

Commit

Permalink
Updates to handle most of the ephys demos in TestJson
Browse files Browse the repository at this point in the history
  • Loading branch information
upibhalla committed Apr 2, 2024
1 parent d0a6acc commit 23ee042
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion simWrapMoose.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import numpy as np
import moose
import sys
from importlib import util

# import imp ## May be deprecated from Python 3.4
# from simWrap import SimWrap
Expand Down Expand Up @@ -379,9 +380,15 @@ def loadModelFile( self, fname, modifyFunc, scaleParam, dumpFname, paramFname ):
# Following the load() command, the chemical system for the
# model must live under
# /library/chem
spec = util.spec_from_file_location("mscript", fname )
mscript = util.module_from_spec(spec)
spec.loader.exec_module(mscript)
rdes = mscript.load()
'''
# Deprecated Python syntax from pre 3.3
mscript = imp.load_source( "mscript", fname )
#mscript = __import__( fileName )
rdes = mscript.load()
'''
if not moose.exists( '/library/chem' ):
if ( moose.exists( '/library/cell' ) ):
self.modelId = moose.element( '/library/cell' )
Expand Down

0 comments on commit 23ee042

Please sign in to comment.