摘要:
在写一些底层模块的时候,特别是日志模块、底层服务等,需要记录调用者的一些信息,比如module name, file name, function name, line number 等,而不是记录我们所写的底层模块的相关信息。这个时候就需要用到python的inspect模块来完成相应的功能以下代码仅作为示例:# -*- coding: utf-8 -*-'''@summary: get caller's module name, file name, function name, line number .etc@author: JerryKwan' 阅读全文
posted @ 2012-12-21 10:06
Jerry.Kwan
阅读(594)
评论(0)
推荐(0)

浙公网安备 33010602011771号