ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print('# Post-analysis')\\nimport numpy\\nxa=ADD.get('Analysis')[-1]\\nf='/tmp/analysis.txt'\\nprint('Analysis saved in \\"%s\\"'%f)\\nnumpy.savetxt(f,xa)" ),
),
AnalysisPrinterAndSaver = BLOC (condition = " Template == 'AnalysisPrinterAndSaver' ",
- ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print('# Post-analysis')\\nimport numpy\\nxa=ADD.get('Analysis')[-1]\\nprint 'Analysis:',xa\\nf='/tmp/analysis.txt'\\nprint('Analysis saved in \\"%s\\"'%f)\\nnumpy.savetxt(f,xa)" ),
+ ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print('# Post-analysis')\\nimport numpy\\nxa=ADD.get('Analysis')[-1]\\nprint('Analysis:',xa)\\nf='/tmp/analysis.txt'\\nprint('Analysis saved in \\"%s\\"'%f)\\nnumpy.savetxt(f,xa)" ),
),
AnalysisSeriePrinter = BLOC (condition = " Template == 'AnalysisSeriePrinter' ",
ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print('# Post-analysis')\\nimport numpy\\nxa=ADD.get('Analysis')\\nprint('Analysis:',xa)" ),
ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print('# Post-analysis')\\nimport numpy\\nxa=ADD.get('Analysis')\\nf='/tmp/analysis.txt'\\nprint('Analysis saved in \\"%s\\"'%f)\\nnumpy.savetxt(f,xa)" ),
),
AnalysisSeriePrinterAndSaver = BLOC (condition = " Template == 'AnalysisSeriePrinterAndSaver' ",
- ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print('# Post-analysis')\\nimport numpy\\nxa=ADD.get('Analysis')\\nprint 'Analysis:',xa\\nf='/tmp/analysis.txt'\\nprint('Analysis saved in \\"%s\\"'%f)\\nnumpy.savetxt(f,xa)" ),
+ ValueTemplate = SIMP(statut = "o", typ = "TXM", min=1, max=1, defaut = "print('# Post-analysis')\\nimport numpy\\nxa=ADD.get('Analysis')\\nprint('Analysis:',xa)\\nf='/tmp/analysis.txt'\\nprint('Analysis saved in \\"%s\\"'%f)\\nnumpy.savetxt(f,xa)" ),
),
),
)
asString = String,
asScript = self.__with_directory(Script),
)))
+ return 0
# -----------------------------------------------------------
self.__adaoObject["AlgorithmParameters"].executePythonScheme( self.__adaoObject )
if "UserPostAnalysis" in self.__adaoObject and len(self.__adaoObject["UserPostAnalysis"])>0:
self.__objname = self.__retrieve_objname()
- __Upa = map(str, self.__adaoObject["UserPostAnalysis"])
- __Upa = eval("\n".join(__Upa))
- exec(__Upa, {}, {'self':self, 'ADD':self, 'case':self, 'adaopy':self, self.__objname:self})
+ for __UpaOne in self.__adaoObject["UserPostAnalysis"]:
+ __UpaOne = eval(str(__UpaOne))
+ exec(__UpaOne, {}, {'self':self, 'ADD':self, 'case':self, 'adaopy':self, self.__objname:self})
return 0
def __executeYACSScheme(self, FileName=None):
__keys = sorted(self.__values.keys())
return __keys
- # def has_key(self, name):
- # "D.has_key(k) -> True if D has a key k, else False"
- # return name in self.__values
-
def __contains__(self, name):
"D.__contains__(k) -> True if D has a key k, else False"
return name in self.__values
)
UserPostAnalysisTemplates.store(
name = "AnalysisPrinterAndSaver",
- content = """print('# Post-analysis')\nimport numpy\nxa=ADD.get('Analysis')[-1]\nprint 'Analysis',xa\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)""",
+ content = """print('# Post-analysis')\nimport numpy\nxa=ADD.get('Analysis')[-1]\nprint('Analysis',xa)\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)""",
fr_FR = "Imprime sur la sortie standard et, en même temps enregistre dans un fichier du répertoire '/tmp', la valeur optimale",
en_EN = "Print on standard output and, in the same time save in a file of the '/tmp' directory, the optimal value",
order = "next",
)
UserPostAnalysisTemplates.store(
name = "AnalysisSeriePrinterAndSaver",
- content = """print('# Post-analysis')\nimport numpy\nxa=ADD.get('Analysis')\nprint 'Analysis',xa\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)""",
+ content = """print('# Post-analysis')\nimport numpy\nxa=ADD.get('Analysis')\nprint('Analysis',xa)\nf='/tmp/analysis.txt'\nprint('Analysis saved in \"%s\"'%f)\nnumpy.savetxt(f,xa)""",
fr_FR = "Imprime sur la sortie standard et, en même temps enregistre dans un fichier du répertoire '/tmp', la série des valeurs optimales",
en_EN = "Print on standard output and, in the same time save in a file of the '/tmp' directory, the optimal value series",
order = "next",