Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > aaabadb7e29c32512528f8e4b50077d5 > files > 306

python-Traits-4.3.0-1.fc18.x86_64.rpm

#  Copyright (c) 2007, Enthought, Inc.
#  License: BSD Style.

#  Copyright (c) 2007, Enthought, Inc.
#  License: BSD Style.

# use_custom_th.py --- Example of using a custom TraitHandler

#--[Imports]--------------------------------------------------------------------
from traits.api import HasTraits, Trait, TraitRange
from custom_traithandler import TraitOddInteger

#--[Code]-----------------------------------------------------------------------
class AnOddClass(HasTraits):
    oddball = Trait(1, TraitOddInteger())
    very_odd = Trait(-1, TraitOddInteger(),
                         TraitRange(-10, -1))