to UTF-8 (easy : que des commentaires, voire que de l'ASCII)
This commit is contained in:
parent
97553ab91f
commit
26a8f31be4
4 changed files with 9 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: iso-8859-15 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# #############################################################
|
# #############################################################
|
||||||
# ..
|
# ..
|
||||||
# .... ............ ........
|
# .... ............ ........
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
"""
|
"""
|
||||||
exceptions.py
|
exceptions.py
|
||||||
|
|
||||||
Fonctions pour gérer les exceptions
|
Fonctions pour gérer les exceptions
|
||||||
|
|
||||||
Copyright (c) 2006 by www.crans.org
|
Copyright (c) 2006 by www.crans.org
|
||||||
Some code, from cherrypy lib
|
Some code, from cherrypy lib
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: iso-8859-15 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# #############################################################
|
# #############################################################
|
||||||
# ..
|
# ..
|
||||||
# .... ............ ........
|
# .... ............ ........
|
||||||
|
@ -34,11 +34,11 @@ def ageOfFile(pathToFile):
|
||||||
return int(time.time()) - os.path.getmtime(pathToFile)
|
return int(time.time()) - os.path.getmtime(pathToFile)
|
||||||
|
|
||||||
def fileIsOlderThan(pathToFile, days=0, hours=0, minutes=0, seconds=0):
|
def fileIsOlderThan(pathToFile, days=0, hours=0, minutes=0, seconds=0):
|
||||||
"""teste si un fichier est plus vieux on non que la valeur donnée"""
|
"""teste si un fichier est plus vieux on non que la valeur donnée"""
|
||||||
time= (((days*24) + hours) * 60 + minutes) * 60 + seconds
|
time= (((days*24) + hours) * 60 + minutes) * 60 + seconds
|
||||||
return ageOfFile(pathToFile) > time
|
return ageOfFile(pathToFile) > time
|
||||||
|
|
||||||
def dirIsEmpty(pathToDir):
|
def dirIsEmpty(pathToDir):
|
||||||
"""teste : répond True si le dossier est vide."""
|
"""teste : répond True si le dossier est vide."""
|
||||||
return os.listdir(pathToDir) == []
|
return os.listdir(pathToDir) == []
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: iso-8859-15 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Représentation des navigateurs utilisés
|
# Représentation des navigateurs utilisés
|
||||||
|
|
||||||
import sys, commands, string, re
|
import sys, commands, string, re
|
||||||
from time import strftime
|
from time import strftime
|
||||||
from operator import add
|
from operator import add
|
||||||
|
|
||||||
# On prend l'argument pour définir la table à analyser
|
# On prend l'argument pour définir la table à analyser
|
||||||
SITE = sys.argv[0].split('_')[1]
|
SITE = sys.argv[0].split('_')[1]
|
||||||
|
|
||||||
# nom de la machine
|
# nom de la machine
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#! /usr/bin/env python
|
#! /usr/bin/env python
|
||||||
# -*- coding: iso8859-15 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
sys.path.append('/usr/scripts/gestion')
|
sys.path.append('/usr/scripts/gestion')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue