Format file size for printing

abcd codecraig at gmail.com
Sun Feb 19 17:17:11 EST 2006


is there a built-in way of printing the size of a file nicely?

So if the file size is 103803 bytes it prints out like: 103.8K
or
0.1MB 

something liek that?




More information about the Python-list mailing list