formatting number of bytes to human readable format

rkmr.em at gmail.com rkmr.em at gmail.com
Tue Aug 12 21:29:12 EDT 2008


is there any library /  function that prints number of bytes in human
readable format?
for example

a=XX(1048576)
print a

should output
1 MB


thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080812/4969d71a/attachment.html>


More information about the Python-list mailing list