How can I get the function's caller?

David 71david at libero.it
Thu Sep 14 12:21:26 CEST 2006


Il Wed, 13 Sep 2006 07:34:45 +0100, Steve Holden ha scritto:

> What do you need this name for, just as a materr of interest? There are 
> ways of manipulating the stack frames, but they'll be slow and possibly 
> unreliable.
I am writing a big (for me) program and it would be helpful to have a dummy
function like this:

def function_A_subfunction_B(self, ....)
	dummy()

that display a standard message like this:

"Dummy: 'function_A_subfunction_B' in module 'module' is not defined yet"

regards
David



More information about the Python-list mailing list