API Reference for Enthought Tool Suite 3.2.0
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)
python_version = (vi[0] + (float(vi[1]) / 10.0))
SequenceTypes = (ListType, TupleType)
StringTypes = (StringType, UnicodeType, IntType, LongType, FloatType, ComplexType)
TraitNotifier = '__trait_notifier__'
The standard Traits property cache prefix:
TraitsCache = '_traits_cache_'
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 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()
Set the Python version being used:
vi = sys.version_info
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()
When the first reference to a trait is a 'get' reference, the default value of the trait is implicitly assigned and returned as the value of the trait. Because of this implicit assignment, a trait change notification is generated with the Uninitialized object as the 'old' value of the trait, and the default trait value as the 'new' value. This allows other parts of the traits package to recognize the assignment as the implicit default value assignment, and treat it specially.
Uninitialized = Uninitialized()
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').
Returns the name of the module that the caller's caller is located in.
Returns a resource path calculated from the caller's stack.
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'.
Verify that a specified path exists, and try to create it if it does not exist.
Returns the value of an extended object attribute name of the form: name[.name2[.name3...]].
Sets the value of an extended object attribute name of the form: name[.name2[.name3...]].
| Local name | Refers to |
|---|---|
| capwords | string.capwords |
| ClassType | types.ClassType |
| ComplexType | types.ComplexType |
| ctraits | ctraits |
| DictType | types.DictType |
| dirname | os.path.dirname |
| exists | os.path.exists |
| FloatType | types.FloatType |
| getcwd | os.getcwd |
| IntType | types.IntType |
| isdir | os.path.isdir |
| join | os.path.join |
| ListType | types.ListType |
| LongType | types.LongType |
| lowercase | string.lowercase |
| makedirs | os.makedirs |
| os | os |
| StringType | types.StringType |
| sys | sys |
| TupleType | types.TupleType |
| TypeType | types.TypeType |
| UnicodeType | types.UnicodeType |
| uppercase | string.uppercase |
© Copyright 2002-2009 Enthought, Inc.