当前位置: 首页>>代码示例>>Python>>正文


Python Logger.add_instruction方法代码示例

本文整理汇总了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)
开发者ID:rogerlindberg,项目名称:autopilot,代码行数:11,代码来源:instructions.py

示例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")
开发者ID:rogerlindberg,项目名称:autopilot,代码行数:17,代码来源:instructions.py

示例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)
开发者ID:rogerlindberg,项目名称:autopilot,代码行数:6,代码来源:instructions.py


注:本文中的lib.reporting.logger.Logger.add_instruction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。