scripts/gestion/tools/list_solde.py
Vincent Le Gallic c039058708 Enregistrement des droits d'exécution. Aucune vraie modif.
Darcs n'enregistrait pas les permissions des fichiers.
2013-01-31 05:36:25 +01:00

25 lines
528 B
Python
Executable file

#! /usr/bin/env python
# -*- coding: iso-8859-15 -*-
import sys
sys.path.append('/usr/scripts/gestion')
from ldap_crans import crans_ldap, decode
db = crans_ldap()
adherents = db.search('solde=*')['adherent']
txts = []
for a in adherents :
if a.solde() == 0 :
continue
# texte pour l'adhérent
txt = u''
txt += u'Nom : %s\n' % a.Nom()
txt += u'Solde : %s\n' % a.solde()
txts.append(txt.strip())
print '\n- - - - - - = = = = = = # # # # # # # # = = = = = = - - - - - -\n'.join(txts)