Alex Willmer wrote: > When reporting file sizes to the user, it's nice to print '16.1 MB', > rather than '16123270 B'. This is the behaviour the command 'df -h' > implements. There's no python function that I could find to perform this > formatting , so I've taken a stab at it:
BOTEC at http://www.alcyone.com/software/botec/ contains a class called SI which does this formatting (and supports all SI prefixes). -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis Dead men have no victory. -- Euripides -- http://mail.python.org/mailman/listinfo/python-list