How to find number of line that is currently executing?

ryles rylesny at gmail.com
Sun Oct 11 00:29:54 CEST 2009


On Oct 9, 11:46 pm, "Dr. Phillip M. Feldman" <pfeld... at verizon.net>
wrote:
> I would like to put a statement on line N of my program that prints the line
> number that is currently executing.

inspect.currentframe().f_lineno

http://docs.python.org/library/inspect.html



More information about the Python-list mailing list