From: Ovidiu Mircescu Date: Tue, 23 Sep 2014 16:03:28 +0000 (+0200) Subject: Use config.txt from ASTER instead of an empty file. X-Git-Tag: V7_5_0a1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fomu%2Fpleiade8084;p=tools%2Fyacsgen.git Use config.txt from ASTER instead of an empty file. --- 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