imports de petits utilisatires pour faire des stats et voir les tats de

certains trucs

darcs-hash:20050411210725-4ec08-0edcb7b1d4e46ce310dbffcffd8b07e50690c8a1.gz
This commit is contained in:
chove 2005-04-11 23:07:25 +02:00
parent 21f285fabb
commit 477219f2ed
8 changed files with 260 additions and 0 deletions

25
gestion/tools/list_solde.py Executable file
View file

@ -0,0 +1,25 @@
#! /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)