diff --git a/gestion/affich_tools.py b/gestion/affich_tools.py index e8d0eb94..6d792037 100755 --- a/gestion/affich_tools.py +++ b/gestion/affich_tools.py @@ -9,6 +9,8 @@ Licence : GPLv2 import sys, sre, os, tempfile +el = os.popen('tput cr ; tput el').read() + def dialog(backtitle,arg) : """ Affiche la boite de dialogue défine avec les arguments fournis (cf man dialog) @@ -164,17 +166,17 @@ class anim : def reinit(self) : """ Efface la ligne courrante et affiche : truc................. """ - sys.stdout.write('\r' + self.txt) + sys.stdout.write(el + self.txt) if self.iter : sys.stdout.write(' '*28) - sys.stdout.write('\r' + self.txt) + sys.stdout.write(el + self.txt) sys.stdout.flush() def cycle(self) : """ Efface la ligne courrante et affiche : truc..................? ? caratère variant à chaque appel """ - sys.stdout.write('\r' + self.txt) + sys.stdout.write(el + self.txt) if self.iter!=0 : sys.stdout.write('[') av = float(self.c) / float(self.iter)