What function called this function ??

Terry Reedy tjreedy at udel.edu
Wed Sep 25 10:56:15 EDT 2002


"Thomas Weholt" <2002 at weholt.org> wrote in message
news:98jk9.22340$0p1.391334 at news2.ulv.nextra.no...
> Is it possible, by hacking the traceback/stack/etc, to get
information about
> the function, that functions class and in what module that function
and
> class are defined, from inside a function located elsewhere?
Something like
> a way of answering the question of  "who called me?" without sending
the
> answer along as a parameter.

Yes.  Traceback hack has been posted previously.  If not in the FAQ,
you might find posts thru groups.google.com.

TJR





More information about the Python-list mailing list