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


Python Log.logger方法代码示例

本文整理汇总了Python中pi3d.util.Log.logger方法的典型用法代码示例。如果您正苦于以下问题:Python Log.logger方法的具体用法?Python Log.logger怎么用?Python Log.logger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pi3d.util.Log的用法示例。


在下文中一共展示了Log.logger方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _load_library

# 需要导入模块: from pi3d.util import Log [as 别名]
# 或者: from pi3d.util.Log import logger [as 别名]
def _load_library(name, version=""):
  """Try to load a shared library, report an error on failure."""
  try:
    import ctypes
    return ctypes.CDLL("lib{}.so{}".format(name, version))
  except:
    from pi3d.util import Log
    Log.logger(__name__).error("Couldn't load library lib%s.so%s", name, version)
开发者ID:jmalm,项目名称:pi3d,代码行数:10,代码来源:__init__.py

示例2: _load_library

# 需要导入模块: from pi3d.util import Log [as 别名]
# 或者: from pi3d.util.Log import logger [as 别名]
def _load_library(name):
  """Try to load a shared library, report an error on failure."""
  if name:
    try:
      import ctypes
      return ctypes.CDLL(name)
    except:
      from pi3d.util import Log
      Log.logger(__name__).error("Couldn't load library %s", name)
开发者ID:AlimYusifzada,项目名称:pi3d,代码行数:11,代码来源:__init__.py

示例3: _load_library

# 需要导入模块: from pi3d.util import Log [as 别名]
# 或者: from pi3d.util.Log import logger [as 别名]
def _load_library(name, dll_type="C"):
    """Try to load a shared library, report an error on failure."""
    if name:
        try:
            if dll_type == "Win":
                return ctypes.WinDLL(name)
            else:
                return ctypes.CDLL(name)
        except:
            from pi3d.util import Log

            Log.logger(__name__).error("Couldn't load library %s", name)
开发者ID:tipam,项目名称:pi3d,代码行数:14,代码来源:__init__.py

示例4: _Mouse

# 需要导入模块: from pi3d.util import Log [as 别名]
# 或者: from pi3d.util.Log import logger [as 别名]
from __future__ import absolute_import, division, print_function, unicode_literals

import threading
import six

from pi3d.util import Log

LOGGER = Log.logger(__name__)

class _Mouse(threading.Thread):
  """holds Mouse object, see also (the preferred) events methods"""
  BUTTON_1 = 1 << 1
  BUTTON_2 = 1 << 2
  BUTTONS = BUTTON_1 & BUTTON_2
  HEADER = 1 << 3
  XSIGN = 1 << 4
  YSIGN = 1 << 5
  INSTANCE = None

  def __init__(self, mouse='mice', restrict=True, width=1920, height=1200):
    """
    Arguments:
      *mouse*
        /dev/input/ device name
      *restrict*
        stops or allows the mouse x and y values to carry on going beyond:
      *width*
        mouse x limit
      *height*
        mouse y limit
    """
开发者ID:jmalm,项目名称:pi3d,代码行数:33,代码来源:Mouse.py


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