scripts/gestion/tools/list_solde.py
bernat 37b21339a6 Detabification massive.
darcs-hash:20051018083823-d1718-09c2df38cfb707d3c3679188b9b9a812009f4f7c.gz
2005-10-18 10:38:23 +02:00

25 lines
549 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().encode('iso-8859-1')
txt += u'Solde : %s\n' % a.solde()
txts.append(txt.strip())
print '\n- - - - - - = = = = = = # # # # # # # # = = = = = = - - - - - -\n'.join(txts)