Returns a human readable string reprentation of bytes
(bytes, units=(' bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'))
| 26 | |
| 27 | |
| 28 | def human_size(bytes, units=(' bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB')): |
| 29 | """ Returns a human readable string reprentation of bytes""" |
| 30 | return str(bytes) + ' ' + units[0] if bytes < 1024 else human_size(bytes >> 10, units[1:]) |
| 31 | |
| 32 | |
| 33 | def update_window(window): |
no outgoing calls
no test coverage detected