1 from Source import Source
2 from enigma import eTimer
5 # you can use that boolean well to express screen-private
6 # conditional expressions.
8 # however, if you think that there is ANY interest that another
9 # screen could use your expression, please put your calculation
10 # into a seperate Source, providing a "boolean"-property.
11 class Boolean(Source, object):
12 def __init__(self, fixed = False, function = None, poll = 0):
15 self.poll_timer = eTimer()
16 self.poll_timer.timeout.get().append(self.changed)
17 self.poll_timer.start(poll)
20 if self.function is not None:
21 return self.function()
25 boolean = property(getBoolean)