Commit 3350419e authored by salles's avatar salles

On rcupre une valeur dcimale et non la valeur entire de la division.

On voit plus de navigateurs ainsi.

darcs-hash:20060505124916-72cb0-78dfd61e0a0f4ad976f30011d7d6e86a1d9e3473.gz
parent a3107c89
......@@ -32,11 +32,11 @@ total = reduce(add, navigateurs.values())
usage = {}
for nav in navigateurs.keys() :
pourcentage = navigateurs[nav]*100/total
pourcentage = navigateurs[nav]*100.0/total
if pourcentage > 1 :
usage[nav] = pourcentage
reste = 100 - reduce(add, usage.values())
reste = 100.0 - reduce(add, usage.values())
try :
arg = sys.argv[1]
......@@ -68,6 +68,6 @@ else :
nom = key
for char in [' ','_','-','/','\\',':',';','.'] :
nom = nom.replace(char, '')
print '%s.value %s' % (nom, usage[key])
print 'reste.value %s' % reste
print '%s.value %.2f' % (nom, usage[key])
print 'reste.value %.2f' % reste
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment