From d9c15424015ead62ded5c67bb7322c41b198bf85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Elliott=20B=C3=A9cue?= Date: Tue, 2 Sep 2014 00:41:46 +0200 Subject: [PATCH] =?UTF-8?q?[stats=5Fcableurs2]=20Encodage=20pour=20pouvoir?= =?UTF-8?q?=20passer=20la=20sortie=20=C3=A0=20less?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/stats_cableurs2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/stats_cableurs2.py b/utils/stats_cableurs2.py index 4dbc6705..cbd421b2 100755 --- a/utils/stats_cableurs2.py +++ b/utils/stats_cableurs2.py @@ -38,6 +38,7 @@ adherents = db.search(u'(&(debutAdhesion>=%s)(aid=*))' % (crans_utils.toGenerali cableurs = db.search(u'(|(droits=cableur)(droits=nounou))') scores = [] historique = [] +encoding = sys.stdout.encoding or "UTF-8" #### On prends les historiques de tout les adhérents def parse_historique(ligne): @@ -108,7 +109,7 @@ def show_all(limit, swap): largeur = [25, 8, 16, 16] alignement = ["c", "c", "c", "c"] data = [[elem for elem in scores[index]] for index in xrange(limit)] - print affichage.tableau(data, titre=titre, largeur=largeur, alignement=alignement, swap=swap) + print affichage.tableau(data, titre=titre, largeur=largeur, alignement=alignement, swap=swap).encode(encoding) #### On définit le Parser if __name__ == "__main__":