API Reference for Enthought Tool Suite 2.7.1

Ensures that a trait attribute value is a string that satisfied some additional, optional constraints.

The optional constraints include minimum and maximum lengths, and a regular expression that the string must match.

If the value assigned to the trait attribute is a Python numeric type, the TraitString handler first coerces the value to a string. Values of other non-string types result in a TraitError being raised. The handler then makes sure that the resulting string is within the specified length range and that it matches the regular expression.

Inherits from

Method summary

Methods

Copyright © 2002-2008 Enthought, Inc.