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


Python Debug.log方法代码示例

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


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

示例1: post

# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import log [as 别名]
	def post( self, event ):
		if not isinstance( event, TickEvent ):
			Debug.log( "Event: " + event.name )

		# Event is broadcast to all listeners
		for listener in self.listeners:
			listener.notify( event )
开发者ID:gelatindesign,项目名称:Fish,代码行数:9,代码来源:Event.py

示例2: randomSong

# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import log [as 别名]
	def randomSong(self):
		self.__select("count(*) FROM tags")
		(count, ) = self.__fetchone()
		self.__select("url FROM tags LIMIT 1 OFFSET %s" % random.randint(0, int(count)-1))
		(url, ) = self.__fetchone()
		Debug.log("Random song: " + url)
		return url
开发者ID:BackupTheBerlios,项目名称:amarok-jukebox-svn,代码行数:9,代码来源:Collection.py

示例3: notify

# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import log [as 别名]
	def notify( self, event ):
		if isinstance( event, KeyboardInputEvent ):
			# Handle keyboard input
			# Check controllable actor's maps
			try:
				Debug.log( "Keyboard: %s" % event.data.unicode )
			except:
				Debug.log( "Keyboard: %s" % event.data.key )
开发者ID:gelatindesign,项目名称:Fish,代码行数:10,代码来源:Control.py

示例4: call

# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import log [as 别名]
def call(call):
    Debug.log("DCOP call: " + call)
    f = os.popen("dcop amarok %s" % call)
    result = f.read()
    if f.close() is not None:
        raise Error
    result = result.strip()
    Debug.log("DCOP response: " + result)
    return result
开发者ID:BackupTheBerlios,项目名称:amarok-jukebox-svn,代码行数:11,代码来源:Dcop.py

示例5: __select

# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import log [as 别名]
        def __select(self, query):
		query = "SELECT %s" % query
		Debug.log("DCOP query: %s" % query)
		r = self.__dcop.query(query)
		Debug.log("DCOP results: %s" % r)
		nargs = len(query.split("FROM")[0].split(","))
		self.__results = [ ]
		while len(r) > 0:
			a = [ ]
			for i in range(nargs):
				a.append(r.pop(0))
			self.__results.append(a)
开发者ID:BackupTheBerlios,项目名称:amarok-jukebox-svn,代码行数:14,代码来源:Collection.py

示例6: __dispatch

# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import log [as 别名]
 def __dispatch(self, s):
     Debug.log("Event received: " + s)
     if s.find("engineStateChange: empty" ) >= 0:
         Debug.log("Playlist is empty!")
         if self.__state.isRunning():
             Debug.log("Queuing random song")
             self.__playlist.playRandom()
         else:
             Debug.log("Not running")
     elif s.find("trackChange" ) >= 0:
         if not self.__playlist.isPlaying():
             Debug.log("Queuing random song")
             self.__playlist.playRandom()
开发者ID:BackupTheBerlios,项目名称:amarok-jukebox-svn,代码行数:15,代码来源:AmarokEventHandler.py

示例7: albumCoverMarkup

# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import log [as 别名]
def albumCoverMarkup(s):
    try:
        import Image
        try:
            im = Image.open(s)
        except IOError:
            return "<!-- No cover found -->"
        height, width = im.size
        if (height > 150):
            height = "height='150'"
        else:
            height = ""
    except:
        Debug.log("WARNING: install PIL")
        height = "height='150'"
    return "<p class='cover'><img id='cover' %s src='browse?cover=%s'/></p>" % (height, cgi.escape(s))
开发者ID:BackupTheBerlios,项目名称:amarok-jukebox-svn,代码行数:18,代码来源:browse.py

示例8: __init__

# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import log [as 别名]
	def __init__( self, event ):
		self.name = "Alert Event"
		Debug.log( event )
开发者ID:gelatindesign,项目名称:Fish,代码行数:5,代码来源:Event.py


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