Basic classes and data

This attribute is available at the module level:

float STANDARD_TEMPERATURE — read-only

The standard temperature, in Kelvin, as defined by IUPAC.

Qualifiers

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_NEUTRALIndicates a presumably valid value.
Q_UNKIndicates that a value is unknown or unavailable.
Q_NAIndicates that a value is not applicable for an element.
Q_ESTIndicates that a value is estimated or calculated.
Q_CAIndicates that a value is approximate.
Q_ISOIndicates a value for the most stable isotope of an element.

class color

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-only

The luminous intensity of the color, between 0.0 and 1.0.

color compliment — read-only

A grayscale color complimentary in luminance to this color.

str hex_spec — read-only

A hexadecimal specification of the color ("#rrggbb" format).

color composite (color other, float alpha)

Returns a composite of this color and another.

otherA color with which this color will be composited.
alphaThe level of the other color in the composite, between 0.0 and 1.0.

class EntriesView

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.

categoryThe name of the category.
null entry (unicode name, unicode value[, unicode tip])

Displays a single value entry. Raises NotImplementedError; must be implemented in subclasses.

nameThe name of the entry.
valueA localized string representation of the value of the entry.
tipQualifying information, if any, to be displayed as a tip.

class EntriesStream

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.

class value_base

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-only

Whether the value is defined.

unicode get_string ([unicode format])

Returns a localized text representation of the value.

formatAn optional compose-style format string with which to output the value. If not otherwise specified, the value is argument reference "%1".
unicode tip — read-only

A 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.

viewThe EntriesView to be populated.
nameThe name of the value to be passed.
formatAn optional compose-style format for get_string.

class color_value_base

A base class for qualified values which have representative colors. Inherits from value_base.

color color — read-only

A color representing the value.