Python C Interface: finding out the called method's name in C PyMethod?
Josiah Carlson
jcarlson at nospam.uci.edu
Sun Feb 29 16:09:33 EST 2004
> So, it there a way to find out the called method name from a PyMethod C
> function?
There is a straightforward method using the inspect module in Python:
http://www.python.org/doc/current/lib/inspect-stack.html
You could create a function in Python that calls current_frame(), pulls
out the name of your C method, and returns it.
- Josiah
More information about the Python-list
mailing list