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

        @trt.default('b')
        def _make_b(self):
            return 2
Beispiel #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
Beispiel #3
0
def recursed_trait():
    recursed_trait = trt.Tuple(trt.Int(), trt.List())
    recursed_trait._traits[1]._trait = recursed_trait

    return recursed_trait
Beispiel #4
0
 class D(C):
     d = trt.Int(4)
     e = trt.Int()
Beispiel #5
0
 class C(trt.HasTraits):
     aa = trt.Int(1)
     a = 0
Beispiel #6
0
 class D(cmdlets.Spec, C):
     d = trt.Int(4)
     e = trt.Int()
Beispiel #7
0
 class RootCmd(cmdlets.Cmd):
     subcommands = {'sub': (SubCmd, "help string")}
     a = trt.Int(config=True)
     b = trt.Int(config=True)
Beispiel #8
0
 class SubCmd(cmdlets.Cmd):
     s = trt.Int(config=True)
Beispiel #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")