From: pascale.noyret Date: Wed, 23 Jun 2021 09:25:18 +0000 (+0200) Subject: ajout des fins de lignes X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e0a69ccff1f82c2bc56c06e4ed283efb4aedaac4;p=tools%2Feficas.git ajout des fins de lignes --- diff --git a/generator/generator_XML.py b/generator/generator_XML.py index ff8f54e6..e4d882bd 100644 --- a/generator/generator_XML.py +++ b/generator/generator_XML.py @@ -83,7 +83,7 @@ class XMLGenerator(PythonGenerator): #filePyxb = fn[:fn.rfind(".")] + '.py' fileBase = os.path.basename(fileXML) fileBase = fileBase[:fileBase.rfind(".")] + '.py' - filePyxb = '/tmp/' + fileBase + filePyxb = '/tmp/example_' + fileBase #print (filePyxb) #fileDico='/tmp/toto.xml' #print (self.texteXML) @@ -92,6 +92,8 @@ class XMLGenerator(PythonGenerator): f.close() f = open( str(filePyxb), 'w') + self.textePourAide='txt=""'+'\n'+self.textePourAide + self.textePourAide=self.textePourAide+'print (txt)'+'\n' f.write(str(self.textePourAide)) f.close() @@ -104,8 +106,7 @@ class XMLGenerator(PythonGenerator): nomUtil = obj.nom self.dictNbNomObj[obj.nom] = 1 self.textePourAide += nomUtil + " = vimmpCase." + obj.getNomDsXML() + "\n" - #self.textePourAide += "print '"+ nomUtil+ " =' , " + str(nomUtil) + "\n" - self.textePourAide +='txt += "' + nomUtil + '" + " = " +str( ' + nomUtil + ') ' + "\n" + self.textePourAide +='txt += "' + nomUtil + '" + " = " +str( ' + nomUtil + ')+"\\n"'+ "\n"