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.

Classes

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.

is_trait_type(trait_type)[source]

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

get_editor()[source]

Returns the user interface editor associated with the trait.

get_help(full=True)[source]

Returns the help text for a trait.

Parameters
  • 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.

info()[source]

Returns a description of the trait.

as_ctrait()[source]

Method that returns self for trait converters.

Table of Contents

Previous topic

traits.constants Module

Next topic

traits.ctraits Module

This Page