traits.ctrait Module

Defines the core CTrait class.

The CTrait class extends the C-level cTrait type to provide the full CTrait API. CTraits are the core objects that are used to generate defaults and validate as well as maintining a list of notifiers and calling them when values are modified.


class traits.ctrait.CTrait[source]

Extends the underlying C-based cTrait type.

property comparison_mode

Get or set the comparison mode on the trait. Getter returns a ComparisonMode enum. Setter acceps either an int or a ComparisonMode enum.


Returns whether or not this trait is of a specified trait type.


Returns the user interface editor associated with the trait.


Returns the help text for a trait.

  • full (bool) – Indicates whether to return the value of the help attribute of the trait itself.

  • Description

  • -----------

  • full is False or the trait does not have a help string, (If) –

  • returned string is constructed from the desc attribute on the (the) –

  • and the info string on the trait's handler. (trait) –

full_info(object, name, value)[source]

Returns a description of the trait.


Returns a description of the trait.


Method that returns self for trait converters.

Table of Contents

Previous topic

traits.constants Module

Next topic

traits.ctraits Module

This Page