astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v5.2.1 »
- Units and Quantities (`astropy.units`) »
- Console

# Console

class astropy.units.format.Console(*args, **kwargs)

  Bases: `Base`

  Output-only format for to display pretty formatting at the console.

  For example:

      >>> import astropy.units as u
      >>> print(u.Ry.decompose().to_string('console'))
                       m^2 kg
      2.1798721*10^-18 ------
                        s^2

  Attributes Summary

  `name` |

  Methods Summary

  `format_exponential_notation`(val) |
  `to_string`(unit) | Convert a unit object to a string.

  Attributes Documentation

  name = 'console'

  Methods Documentation

  classmethod format_exponential_notation(val)
  classmethod to_string(unit)

    Convert a unit object to a string.