Salome HOME
projects
/
tools
/
eficas.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a21c352
)
optim eciture
author
pascale.noyret
<pascale.noyret@edf.fr>
Tue, 18 Apr 2017 15:07:29 +0000
(17:07 +0200)
committer
pascale.noyret
<pascale.noyret@edf.fr>
Tue, 18 Apr 2017 15:07:29 +0000
(17:07 +0200)
generator/Formatage.py
patch
|
blob
|
history
diff --git
a/generator/Formatage.py
b/generator/Formatage.py
index 7a1b59c87070ea2650bf1ae660538a0db2550fe4..0dc4c0572fd26b46c4631411e943600cf135048c 100644
(file)
--- a/
generator/Formatage.py
+++ b/
generator/Formatage.py
@@
-234,8
+234,11
@@
class Formatage (object):
texte est une string qui peut contenir des retours chariots
Cette méthode retourne la longueur de la dernière ligne de texte
"""
- liste = texte.split('\n')
- return len(liste[-1])
+ #liste = texte.split('\n')
+ #return len(liste[-1])
+ if texte [-1] == '\n' : return 0
+ return len(texte[texte.rfind('\n'):-1])
+
def creer_chaine(self,nom,valeur,increment,ind):
"""