En Tue, 19 Jun 2007 18:06:40 -0300, billiejoex <[EMAIL PROTECTED]> escribió:
> On 19 Giu, 22:50, Stefan Sonnenberg-Carstens > <[EMAIL PROTECTED]> wrote: >> billiejoex schrieb: >> >> >> > ...(if it is possible) how can I get, from method "called", the name >> > of function/method that called it (in this case "caller")? >> >> inspect.stack is your friend ;-)- Nascondi testo tra virgolette - >> > Thank you man. That's what I was searching for. > This should be production code. Is insepct.stack fast enough? > Considering that I'd have to use inspect.stack inside a 'while' > statement looping different times, I wouldn't slow down my application. A faster way is to use sys._getframe(1).f_code.co_name But it doesn't feel good for production code... can't you find a different approach? -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list