本文整理汇总了Python中lib.reporting.logger.Logger.add_debug方法的典型用法代码示例。如果您正苦于以下问题:Python Logger.add_debug方法的具体用法?Python Logger.add_debug怎么用?Python Logger.add_debug使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lib.reporting.logger.Logger
的用法示例。
在下文中一共展示了Logger.add_debug方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _find_ctrl
# 需要导入模块: from lib.reporting.logger import Logger [as 别名]
# 或者: from lib.reporting.logger.Logger import add_debug [as 别名]
def _find_ctrl(self, parent, name=None, label=None, wxid=None, pos=None, wx_classname=None):
try:
self.find_wx_ctrl(parent, name, label, wxid, pos, wx_classname)
self.find_win_ctrl(parent, name, label, wxid, pos, wx_classname)
except Found, ex:
Logger.add_debug(ex.message)
return
示例2: _test
# 需要导入模块: from lib.reporting.logger import Logger [as 别名]
# 或者: from lib.reporting.logger.Logger import add_debug [as 别名]
def _test(self):
Logger.set_path(self.manuscript.get_log_path())
Logger.set_log_dialog_descriptions(self.appargs.log_dialog_descriptions())
Logger.add_debug("Application arguments")
Logger.add_debug(" ".join(sys.argv))
Logger.add_section("Manuscript", u"%s" % self.manuscript)
instructions = Instructions(self.manuscript, self.appargs.timedelay())
start_app(instructions, self.appargs.program())
示例3: register_dialog
# 需要导入模块: from lib.reporting.logger import Logger [as 别名]
# 或者: from lib.reporting.logger.Logger import add_debug [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)
示例4: find_menu
# 需要导入模块: from lib.reporting.logger import Logger [as 别名]
# 或者: from lib.reporting.logger.Logger import add_debug [as 别名]
def find_menu(self, args):
try:
win = wx.GetApp().GetTopWindow()
item_id = self._find_menu_item_id(args)
if item_id != wx.NOT_FOUND:
self.item_id = item_id
raise Found("Menu found")
except Found, ex:
Logger.add_debug(ex.message)
return
示例5: find_win_by_name_or_label
# 需要导入模块: from lib.reporting.logger import Logger [as 别名]
# 或者: from lib.reporting.logger.Logger import add_debug [as 别名]
def find_win_by_name_or_label(self, name_or_label):
self.wxctrl = None
self.winctrl = None
try:
if name_or_label is None:
self.wxctrl = wx.GetApp().GetTopWindow()
raise Found("Top window")
for name in name_or_label.split("|"):
name = name.strip()
self.find_wx_win(name, name)
self.find_win_win(name)
except Found, ex:
Logger.add_debug(ex.message)
return
示例6: execute_next_instruction
# 需要导入模块: from lib.reporting.logger import Logger [as 别名]
# 或者: from lib.reporting.logger.Logger import add_debug [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")
示例7: _validate_windows
# 需要导入模块: from lib.reporting.logger import Logger [as 别名]
# 或者: from lib.reporting.logger.Logger import add_debug [as 别名]
def _validate_windows(self):
"""Make sure the topmost window in the list self.windows is still
valid. If not, remove it from the list and continue checking the
list until the list is exhausted or a valid dialog is found.
"""
self.windows.reverse()
while len(self.windows) > 1:
win = self.windows[0]
try:
win.get_label()
try:
if not win.IsShown():
self.windows = self.windows[1:]
else:
break
except:
Logger.add_debug("Window is not visible")
break
except:
Logger.add_debug("get_window_text fails")
self.windows = self.windows[1:]
self.windows.reverse()
示例8: get_environment_path
# 需要导入模块: from lib.reporting.logger import Logger [as 别名]
# 或者: from lib.reporting.logger.Logger import add_debug [as 别名]
def get_environment_path(environment_variable, filename):
try:
home = os.environ[environment_variable]
path = os.path.join(home, filename)
Logger.add_debug(" Path: %s" % path)
if os.path.exists(path):
Logger.add_debug(" Found")
return path
except:
pass
Logger.add_debug(" Not found")
示例9: _get_current_window
# 需要导入模块: from lib.reporting.logger import Logger [as 别名]
# 或者: from lib.reporting.logger.Logger import add_debug [as 别名]
def _get_current_window(self):
Logger.add_debug("self.windows: %s" % self.windows)
self._validate_windows()
Logger.add_debug("self.windows: %s" % self.windows)
try:
current_window = self.windows[-1]
except:
current_window = None
# MessageBox windows seems to to return ok on get_window_text(win.hwnd)
# even though the dialog is closed!
# So we remove it here because the only thing you can do is clicking a
# a button and thereafter the dialog is closed.
if current_window.messagebox:
del (self.windows[-1])
Logger.add_debug("current_window: %s" % current_window)
return current_window
示例10: find_path
# 需要导入模块: from lib.reporting.logger import Logger [as 别名]
# 或者: from lib.reporting.logger.Logger import add_debug [as 别名]
def find_path(manuscript, paths):
Logger.add_debug("Searching data as given: %s" % manuscript)
if os.path.exists(manuscript):
Logger.add_debug(" Found")
return manuscript
Logger.add_debug(" Not found")
Logger.add_debug("Searching data with given paths")
if len(paths) == 0:
Logger.add_debug(" No paths given")
for path in paths:
Logger.add_debug(" Path: %s" % os.path.join(path, manuscript))
if os.path.exists(os.path.join(path, manuscript)):
Logger.add_debug(" Found")
return os.path.join(path, manuscript)
Logger.add_debug(" Not found")
Logger.add_debug("Searching data with environment var paths")
for envar in ["USER_HOME", "AUTOPILOT_HOME"]:
path = get_environment_path(envar, manuscript)
if path is not None:
return path