From e0a69ccff1f82c2bc56c06e4ed283efb4aedaac4 Mon Sep 17 00:00:00 2001 From: "pascale.noyret" Date: Wed, 23 Jun 2021 11:25:18 +0200 Subject: [PATCH] ajout des fins de lignes --- generator/generator_XML.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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" -- 2.39.2