API Reference for Enthought Tool Suite 2.7.1
Defines common, low-level capabilities needed by the Traits package.
ClassTypes = (ClassType, TypeType)
Mapping of coercable types.
CoercableTypes = { Name('LongType') : Tuple([Const(11), Name('long'), Name('int')]), Name('FloatType') : Tuple([Const(11), Name('float'), Name('int')]), Name('ComplexType') : Tuple([Const(11), Name('complex'), Name('float'), Name('int')]), Name('UnicodeType') : Tuple([Const(11), Name('unicode'), Name('str')]) }
ComplexTypes = (float, int)
Singleton object that indicates that a method argument is missing from a type-checked method signature.
Missing = _Missing()
Singleton object that references the current 'object'.
Self = _Self()
SequenceTypes = (ListType, TupleType)
StringTypes = (StringType, UnicodeType, IntType, LongType, FloatType, ComplexType)
TraitNotifier = '__trait_notifier__'
TypeTypes = (StringType, UnicodeType, IntType, LongType, FloatType, ComplexType, ListType, TupleType, DictType, BooleanType)
Singleton object that indicates that a trait attribute has not yet had a value set (i.e., its value is undefined. This object is used instead of None, because None is often has other meanings, such as that a value is not used. When a trait attribute is first assigned a value, and its associated trait notification handlers are called, Undefined is passed as the old parameter, to indicate that the attribute previously had no value.
Undefined = _Undefined()
Returns a string containing the correct indefinite article ('a' or 'an') prefixed to the specified string.
Returns a string containing the class name of an object with the correct indefinite article ('a' or 'an') preceding it (e.g., 'an Image', 'a PlotValue').
Wraps the built-in str() function to raise a TypeError if the argument is not of a type in StringTypes.
Gets the path to the Traits home directory.
Returns a "user-friendly" version of a string, with the first letter capitalized and with underscore characters replaced by spaces. For example, user_name_for('user_name_for') returns 'User name for'.
| Local name | Refers to |
|---|---|
| ClassType | types.ClassType |
| ComplexType | types.ComplexType |
| ctraits | ctraits |
| DictType | types.DictType |
| ETSConfig | enthought.etsconfig.etsconfig.ETSConfig |
| exists | os.path.exists |
| FloatType | types.FloatType |
| generators | __future__.generators |
| IntType | types.IntType |
| join | os.path.join |
| ListType | types.ListType |
| LongType | types.LongType |
| lowercase | string.lowercase |
| os | os |
| StringType | types.StringType |
| sys | sys |
| TupleType | types.TupleType |
| TypeType | types.TypeType |
| UnicodeType | types.UnicodeType |
| uppercase | string.uppercase |
Copyright © 2002-2008 Enthought, Inc.