def playback(self): if logutils.recording(): loggers._writeline("pause" + self.delaytime) if _threaded and self.delaytime > 0: if self.status == "running": self.status = "repeating" if logutils.debugLevel() >= 4: print >> sys.stderr, self.srcline, \ "Pausing", self.delaytime, "milliseconds" gobject.timeout_add(self.delaytime, self, priority=gobject.PRIORITY_LOW) elif self.status == "repeating": if logutils.debugLevel() >= 4: print >> sys.stderr, "Done pausing", self.srcline self.status = "done" else: # not threaded, no need to wait for background tasks self.status = "done" return False
def playback(self): if logutils.recording(): ## Hack opportunity: if it's necessary to modify some ## lines in existing log files, check for the lines here, ## and call loggers._writeline with the modified version. ## This will allow log files to be modified by rerecording ## them. loggers._writeline(self.line) if logutils.debugLevel() >= 4: print >> sys.stderr, "Executing", self.srcline, self.line # Exec'ing the line with an explicitly provided dictionary # allows variables created on one line to be available on a # later line. Otherwise, the variable's scope would just be # this function call, which wouldn't be very useful. exec(self.line, sys.modules[__name__].__dict__) if logutils.debugLevel() >= 4: print >> sys.stderr, "Finished", self.srcline, self.line self.status = "done" return False
def playback(self): if logutils.recording(): loggers._writeline(self.comment) self.status = "done" return False
def playback(self): if logutils.recording(): loggers._writeline("postpone " + self.line) _postponed.append(PostponedLine(self)) self.status = "done" return False