This attribute is available at the module level:
float STANDARD_TEMPERATURE
— read-onlyThe standard temperature, in Kelvin, as defined by IUPAC.
A qualifier is a qualification of the meaning of a value. These read-only int attributes at the module level are valid as qualifiers:
Q_NEUTRAL | Indicates a presumably valid value. |
Q_UNK | Indicates that a value is unknown or unavailable. |
Q_NA | Indicates that a value is not applicable for an element. |
Q_EST | Indicates that a value is estimated or calculated. |
Q_CA | Indicates that a value is approximate. |
Q_ISO | Indicates a value for the most stable isotope of an element. |
A color description.
color ([float red=0.0, float green=0.0, float blue=0.0])
Initializes a color with optional red, green, and blue component percentages.
float red
float green
float blue
The red, green, and blue components of the color in the RGB space, each between 0.0 and 1.0.
float luminance
— read-onlyThe luminous intensity of the color, between 0.0 and 1.0.
color compliment
— read-onlyA grayscale color complimentary in luminance to this color.
str hex_spec
— read-onlyA hexadecimal specification of the color ("#rrggbb" format).
color composite (color other, float alpha)
Returns a composite of this color and another.
other | A color with which this color will be composited. |
alpha | The level of the other color in the composite, between 0.0 and 1.0. |
An interface for the display of value entries.
Instances of this class cannot be created directly. For basic text output, use an EntriesStream
. For other needs, define a subclass of this class with header
and entry
methods.
null header (unicode category)
Displays a category header. Raises NotImplementedError
; must be implemented in subclasses.
category | The name of the category. |
null entry (unicode name, unicode value[, unicode tip])
Displays a single value entry. Raises NotImplementedError
; must be implemented in subclasses.
name | The name of the entry. |
value | A localized string representation of the value of the entry. |
tip | Qualifying information, if any, to be displayed as a tip. |
An adapter for the display of value entries on an output stream.
EntriesStream (file file)
Initializes an EntriesStream with a file or file-like object such as sys.stdout
.
null header (unicode category)
Implemented here; see EntriesView
.
null entry (unicode name, unicode value[, unicode tip])
Implemented here; see EntriesView
.
A base class for qualified values.
Instances of this class cannot be created directly. This class and its subclasses support the str
and cmp
functions.
int qualifier
The qualification of the value's meaning. Must be equal to one of the qualifier constants.
bool has_value
— read-onlyWhether the value is defined.
unicode get_string ([unicode format])
Returns a localized text representation of the value.
format | An optional compose-style format string with which to output the value. If not otherwise specified, the value is argument reference "%1". |
unicode tip
— read-onlyA localized message to be displayed as a tooltip.
null make_entry (EntriesView view, unicode name[, unicode format])
Possibly adds the result of get_string
to an EntriesView
. An entry will only be made if the value is defined or belongs to an always-output class.
view | The EntriesView to be populated. |
name | The name of the value to be passed. |
format | An optional compose-style format for get_string . |
A base class for qualified values which have representative colors. Inherits from value_base
.
color color
— read-onlyA color
representing the value.