Package zephir :: Package monitor :: Package agentmanager :: Module util
[frames] | no frames]

Module util

source code

Various helper functions

Classes
  UTC
UTC timezone
Functions
 
percent(quantity, total)
quantity/total rate, as a percentage
source code
 
expand_dirname(dirname)
Expande ~ et les variables d'environnement dans dirname, et ajoute un séparateur terminal si nécessaire.
source code
 
boolean_to_onoff(b) source code
 
ensure_dirs(*dirs)
Crée les répertoires passés en argument si nécessaire
source code
 
parse_date(date) source code
 
utcnow()
Aware UTC datetime
source code
 
utcfromtimestamp(timestamp) source code
 
timestampfromutc(date) source code
 
status_to_img(s) source code
 
md5file(filename)
Return the hex digest of a file without loading it all into memory
source code
Variables
  utc = UTC()
  TIME_ORIGIN = datetime(1970, 1, 1, tzinfo= utc)
  MONTHS = dict(JAN= 1, FEV= 2, FEB= 2, MAR= 3, APR= 4, AVR= 4, ...
  md5files = {1: [("variables.eol", "variables.eol", None), ("pa...
Variables Details

MONTHS

Value:
dict(JAN= 1, FEV= 2, FEB= 2, MAR= 3, APR= 4, AVR= 4, MAY= 5, MAI= 5, J\
UN= 6, JUI= 7, AOU= 8, AUG= 8, SEP= 9, OCT= 10, NOV= 11, DEC= 12)

md5files

Value:
{1: [("variables.eol", "variables.eol", None), ("patch", "patchs", ".p\
atch"), ("patch/variante", "patchs/variante", ".patch"), ("dicos", "di\
cos", ".eol"), ("dicos/variante", "dicos/variante", ".eol"),], 2: [("z\
ephir.eol", "zephir.eol", None), ("patch", "patchs", ".patch"), ("patc\
h/variante", "patchs/variante", ".patch"), ("dicos/local", "dicos/loca\
l", ".xml"), ("dicos/variante", "dicos/variante", ".xml"),], 3: [("var\
iables.eol", "variables.eol", None), ("patch", "patchs", ".patch"), ("\
patch/variante", "patchs/variante", ".patch"), ("dicos/local", "dicos/\
...