Good try, but that doesn't seem to work either. Maybe I should have
emphasized that what I really want is the line of code, as opposed to
the entire frame. Here is the output of sys._getframe() on my system:

Python 2.3.4 (#1, Feb  2 2005, 12:11:53)
[GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys._getframe()
<frame object at 0x9fbce0c>
>>> from inspect import *
>>> getframeinfo(sys._getframe())
('<stdin>', 1, '?', None, None)

Is it different in 2.4? Maybe there is something else in sys.* that I
am having trouble finding?

TIA,
Leo.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to