You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
452 B
25 lines
452 B
from calculate.variables.datavars import Variable, StringType, Calculate
|
|
|
|
|
|
class A:
|
|
@classmethod
|
|
def test(cls):
|
|
return "test_0"
|
|
|
|
|
|
class B:
|
|
def __init__(self):
|
|
self._value = "test_1"
|
|
|
|
def test(self):
|
|
return self._value
|
|
|
|
|
|
b = B()
|
|
|
|
|
|
Variable("test_0", type=StringType, source=Calculate(A.test))
|
|
Variable("test_1", type=StringType, source=Calculate(b.test))
|
|
|
|
Variable('chroot', type=StringType.readonly, source='/')
|