Greg Ewing wrote:
Steven Bethard wrote:
Gigi wrote:
I need access to a function object that corresponds to a frame object
in a certain case from inside the function.
Can you look up the code's co_name in the previous frame's locals?
You probably also need to check the previous frame's globals...
Steven Bethard wrote:
Gigi wrote:
I need access to a function object that corresponds to a frame object
in a certain case from inside the function.
Can you look up the code's co_name in the previous frame's locals?
You probably also need to check the previous frame's globals... And
there are pro
Gigi wrote:
I need access to a function object that corresponds to a frame object in
a certain case from inside the function.
I can get the frame object using:
f = sys._getframe(0)
But the resulting frame object doesn't contain the information I need.
There is a lot of information in the code ob