[lib] ajout des fichiers non suivis

darcs-hash:20090609134320-bd074-f4df3e57ff2a6e60f07e25cda773524c8e20de3c.gz
This commit is contained in:
Antoine Durand-Gasselin 2009-06-09 15:43:20 +02:00
parent dce8ccb6da
commit c2535c1f04
17 changed files with 2346 additions and 0 deletions

40
lib/cp.py Executable file
View file

@ -0,0 +1,40 @@
#!/usr/bin/env python
# -*- coding: iso-8859-15 -*-
# #############################################################
# ..
# .... ............ ........
# . ....... . .... ..
# . ... .. .. .. .. ..... . ..
# .. .. ....@@@. .. . ........ .
# .. . .. ..@.@@..@@. .@@@@@@@ @@@@@@. ....
# .@@@@. .@@@@. .@@@@..@@.@@..@@@..@@@..@@@@.... ....
# @@@@... .@@@.. @@ @@ .@..@@..@@...@@@. .@@@@@. ..
# .@@@.. . @@@. @@.@@..@@.@@..@@@ @@ .@@@@@@.. .....
# ...@@@.... @@@ .@@.......... ........ ..... ..
# . ..@@@@.. . .@@@@. .. ....... . .............
# . .. .... .. .. . ... ....
# . . .... ............. .. ...
# .. .. ... ........ ... ...
# ................................
#
# #############################################################
"""
cp.py
Fonctions pour cherrypy (intranet)
Copyright (c) 2006 by www.crans.org
"""
import cherrypy
def log(string, keyword = "INTRANET", level = 0):
"""Utilise la fonction log de cherrypy avec quelques modification
-> introduit le login de la session en cours s'il existe
"""
try:
login = cherrypy.session['uid']
string = "[%s] %s" % ( login, string )
except:
pass
cherrypy.log(string, keyword, level)