Пример #1
0
 def addEvent(self, text=None):
     # this adds a duration event. When it is done, the user should call
     # e.finish(). They can also mangle it by modifying .text
     e = Event()
     e.started = util.now()
     if text is None:
         text = []
     e.text = text
     return e  # they are free to mangle it further
Пример #2
0
 def addEvent(self, text=[]):
     # this adds a duration event. When it is done, the user should call
     # e.finish(). They can also mangle it by modifying .text
     e = Event()
     e.started = util.now()
     e.text = text
     self.events.append(e)
     self.prune(events_only=True)
     return e  # they are free to mangle it further
Пример #3
0
 def addPointEvent(self, text=None):
     # this adds a point event, one which occurs as a single atomic
     # instant of time.
     e = Event()
     e.started = util.now()
     e.finished = 0
     if text is None:
         text = []
     e.text = text
     return e  # for consistency, but they really shouldn't touch it
Пример #4
0
 def addPointEvent(self, text=[]):
     # this adds a point event, one which occurs as a single atomic
     # instant of time.
     e = Event()
     e.started = util.now()
     e.finished = 0
     e.text = text
     self.events.append(e)
     self.prune(events_only=True)
     return e  # for consistency, but they really shouldn't touch it