[stats_cableurs2] Encodage pour pouvoir passer la sortie à less
This commit is contained in:
parent
6595e75aa1
commit
d9c1542401
1 changed files with 2 additions and 1 deletions
|
@ -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__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue