Exemple #1
0
    class C(trt.HasTraits):
        a = trt.Int(1)
        b = trt.Int()

        @trt.default('b')
        def _make_b(self):
            return 2
Exemple #2
0
def eventful_trait():
    recursed_trait = trt.Tuple(trt.Int(), trt.List(eventful=True))
    recursed_trait._traits[1]._trait = recursed_trait

    return recursed_trait
Exemple #3
0
def recursed_trait():
    recursed_trait = trt.Tuple(trt.Int(), trt.List())
    recursed_trait._traits[1]._trait = recursed_trait

    return recursed_trait
Exemple #4
0
 class D(C):
     d = trt.Int(4)
     e = trt.Int()
Exemple #5
0
 class C(trt.HasTraits):
     aa = trt.Int(1)
     a = 0
Exemple #6
0
 class D(cmdlets.Spec, C):
     d = trt.Int(4)
     e = trt.Int()
Exemple #7
0
 class RootCmd(cmdlets.Cmd):
     subcommands = {'sub': (SubCmd, "help string")}
     a = trt.Int(config=True)
     b = trt.Int(config=True)
Exemple #8
0
 class SubCmd(cmdlets.Cmd):
     s = trt.Int(config=True)
Exemple #9
0
 class C(trc.Configurable):
     "Class help"
     a = trt.Int(1, config=True, help="Trait help test")
     b = trt.Int(1, config=True, help="2nd trait help test")