Re: How to find number of line that is currently executing?

2009-10-10 Thread koranthala
On Oct 10, 8:54 am, Chris Rebert c...@rebertia.com wrote: On Fri, Oct 9, 2009 at 8:46 PM, Dr. Phillip M. Feldman pfeld...@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. This may sound fairly trivial, but I

Re: How to find number of line that is currently executing?

2009-10-10 Thread ryles
On Oct 9, 11:46 pm, Dr. Phillip M. Feldman pfeld...@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 --

How to find number of line that is currently executing?

2009-10-09 Thread Dr. Phillip M. Feldman
I would like to put a statement on line N of my program that prints the line number that is currently executing. This may sound fairly trivial, but I don't want to hard code the line number because N will change if lines are inserted or deleted above that point. Any advice will be appreciated. --

Re: How to find number of line that is currently executing?

2009-10-09 Thread Chris Rebert
On Fri, Oct 9, 2009 at 8:46 PM, Dr. Phillip M. Feldman pfeld...@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. This may sound fairly trivial, but I don't want to hard code the line number because N will change