_log.py
import inspect
import sys
def _log():
print '------------------------->'
for i in inspect.stack()[1:-1]:
print '%s:%s | %s' % ( i[1].ljust(40), str(i[2]).rjust(5), i[3] )
print '-------------------------<'
pro.py
import _log
def test():
_log._log( )
test()
日志 - 打印函数的调用过程
最新推荐文章于 2022-11-29 09:29:33 发布