本文整理汇总了Python中Debug.printet方法的典型用法代码示例。如果您正苦于以下问题:Python Debug.printet方法的具体用法?Python Debug.printet怎么用?Python Debug.printet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Debug
的用法示例。
在下文中一共展示了Debug.printet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _handle_mouse_events
# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import printet [as 别名]
def _handle_mouse_events(self, m_event, event):
"""
Function that routes mouse events to the appropriate handlers
Prints logging and UI information about the state of the mouse and then routes
the mouse event to the appropriate handler
:m_event: The specifier for the tupe of event that has been generated
:event: The tk provided event object
"""
event.x = int(self._canvas.canvasx(event.x))
event.y = int(self._canvas.canvasy(event.y))
self._status.set_text("Mouse X:" + str(self._cache["x"]) + "\tMouse Y:" + str(self._cache["y"]))
Debug.printet(event, m_event, Debug.Level.INFO)
self._cache["event"] = event
try:
self._commands[m_event]((event.x, event.y))
except KeyError:
Debug.printi("Warning, no control mapped to " + m_event, Debug.Level.ERROR)
self._command_cache = m_event