Peter Hansen wrote:
> Leo wrote:
>> 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.
>
> Ah, it wasn't clear from your first post that you were specifically
> interested in a line you
Leo wrote:
> 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.
Ah, it wasn't clear from your first post that you were specifically
interested in a line you entered at the *interactive pr
On 10 Aug 2005 15:08:21 -0700, "Leo" <[EMAIL PROTECTED]> wrote:
>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, Fe
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 lin
Leo wrote:
> Why is it not possible to get the frame from the interpreter using the
> inspect library?
Because sys._getframe() does the job instead?
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
Why is it not possible to get the frame from the interpreter using the
inspect library? IOW, why does this code:
>>> from inspect import *
>>> stack()
produce:
[(, '', 1, '?', None, None)]
instead of:
[(, '', 1, '?', '\tstack()', 0)]
?
I must be missing something. The motivating question is: