Console

class astropy.units.format.Console[source] [edit on github]

Bases: astropy.units.format.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)

Attributes Documentation

name = ‘console’

Methods Documentation

classmethod format_exponential_notation(val)[source] [edit on github]
classmethod to_string(unit)[source] [edit on github]