How to find number of line that is currently executing?

ryles rylesny at gmail.com
Sat Oct 10 18:29:54 EDT 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