python sys模块

1. 获得当前代码所在的行

import sys
print "here is:", __file__, ":", sys._getframe().f_lineno

 

posted @ 2015-05-04 21:10  jihite  阅读(1136)  评论(0编辑  收藏  举报