本文整理汇总了Python中lib.reporting.logger.Logger.add_instruction方法的典型用法代码示例。如果您正苦于以下问题:Python Logger.add_instruction方法的具体用法?Python Logger.add_instruction怎么用?Python Logger.add_instruction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lib.reporting.logger.Logger
的用法示例。
在下文中一共展示了Logger.add_instruction方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: register_dialog
# 需要导入模块: from lib.reporting.logger import Logger [as 别名]
# 或者: from lib.reporting.logger.Logger import add_instruction [as 别名]
def register_dialog(self, win=None):
if win is None:
return
Logger.add_debug("Registering window: %s" % win)
self.windows.append(win)
if not self.execution_started:
Logger.add_instruction("Execution of instructions start")
self.execution_started = True
wx.CallLater(TIME_TO_WAIT_BEFORE_CONTINUING_IN_MILLISECONDS, self.execute_next_instruction)
示例2: execute_next_instruction
# 需要导入模块: from lib.reporting.logger import Logger [as 别名]
# 或者: from lib.reporting.logger.Logger import add_instruction [as 别名]
def execute_next_instruction(self):
try:
instruction = self._next_instruction()
instruction._replace_placeholders()
self._display_instruction_in_popup_window(instruction)
if isinstance(instruction, AddPlaceholderInstruction):
delay = 0
else:
# TODO: We have some timing problem so we can't set
# waiting time to 0. 40 seems to be ok,
delay = max(40, self.timedelay * 1000)
Logger.add_debug("Preparing instruction '%s' for execution with delay %d" % (instruction, delay))
wx.CallLater(delay, self._execute_instruction, instruction)
except NoMoreInstructionsException:
Logger.add_instruction("The last instruction has been executed")
示例3: _execute_instruction
# 需要导入模块: from lib.reporting.logger import Logger [as 别名]
# 或者: from lib.reporting.logger.Logger import add_instruction [as 别名]
def _execute_instruction(self, instruction):
Logger.add_instruction(instruction)
current_window = self._get_current_window()
instruction.execute(self, current_window)