Python traitlets.Enum() Examples

The following are 1 code examples of traitlets.Enum(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module traitlets , or try the search function .
Example #1
Source File: test_namelists.py    From pylada-light with GNU General Public License v3.0 5 votes vote down vote up
def WithTraitLets():
    from traitlets import Enum

    class WithTraitLets(Namelist):
        ibrav = Enum([0, 1, 2, 3, 4, 5, -5, 6, 7, 8, 9, -9, 10, 11, 12, -12, 13, 14], 0,
                     help="Bravais class", allow_none=True)
    return WithTraitLets