interpreter frame

Leo leo.uaz at gmail.com
Wed Aug 10 18:08:21 EDT 2005


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.




More information about the Python-list mailing list