def install(version): from getjnml import install_jnml home = os.environ['HOME'] p = os.path.join(home, 'jnml/jNeuroMLJar') JNeuroMLEngine.path = p JNeuroMLEngine.environment_vars = {'JNML_HOME': p} inform('Will fetch and install the latest jNeuroML jar', indent=2) install_jnml()
def __init__(self, target): try: FNULL = open(os.devnull, 'w') sp.check_call(['jnml', '-h'], stdout=FNULL) except OSError: from getjnml import install_jnml inform('Will fetch and install the latest JNeuroML jar', indent=2) install_jnml() self.modelpath = target
def __init__(self, target): try: FNULL = open(os.devnull, "w") sp.check_call(["jnml", "-h"], stdout=FNULL) except OSError: from getjnml import install_jnml inform("Will fetch and install the latest JNeuroML jar", indent=2) install_jnml() self.modelpath = target