Console

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

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)[source]
classmethod to_string(unit)[source]

Convert a unit object to a string.