Web上有各种片段,可以为您提供从字节大小返回人类可读大小的功能:
>>> human_readable(2048) '2 kilobytes' >>>
但是有没有提供这个的Python库?
python filesize code-snippets
code-snippets ×1
filesize ×1
python ×1