From d22f6ec4cad6c9cf1f8ee35b5d49115cab667c82 Mon Sep 17 00:00:00 2001 From: Ovidiu Mircescu Date: Tue, 23 Sep 2014 18:03:28 +0200 Subject: [PATCH] Use config.txt from ASTER instead of an empty file. --- module_generator/astcompo.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/module_generator/astcompo.py b/module_generator/astcompo.py index aa69f70..69fc4d1 100644 --- a/module_generator/astcompo.py +++ b/module_generator/astcompo.py @@ -162,7 +162,22 @@ class ASTERComponent(Component): """standalone component: generate files for calculation code""" fdict={} - fdict["%s_config.txt" % self.name] = "# a completer" + #use a specific main program (modification of config.txt file) + config = "" + path_config = os.path.join(self.aster_dir, "config.txt") + if os.path.exists(path_config) : + fil = open(path_config) + config = fil.read() + fil.close() +# config = re.sub(" profile.sh", os.path.join(self.aster_dir, "profile.sh"), config) +# path=os.path.join(os.path.abspath(gen.module.prefix),'lib', +# 'python%s.%s' % (sys.version_info[0], sys.version_info[1]), +# 'site-packages','salome','%s_component.py'%self.name) +# config = re.sub("Execution\/E_SUPERV.py", path, config) + else : + config = "# a completer:%s n'existe pas" % path_config + + fdict["%s_config.txt" % self.name] = config fdict["%s_component.py" % self.name] = component.substitute(component=self.name) return fdict -- 2.39.2