astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v0.3 »
- Astropy Core Package Utilities (`astropy.utils`) »
- human_file_size

# human_file_size

`astropy.utils.console.``human_file_size`(size)

  Returns a human-friendly string representing a file size that is 2-4 characters long.

  For example, depending on the number of bytes given, can be one of:

      256b
      64k
      1.1G

  Parameters:

  size : int

  > The size of the file (in bytes)

  Returns:

  size : str

  > A human-friendly representation of the size of the file