Getting class name
Travis Whitton
whitton at atlantic.net
Fri Aug 29 11:44:57 EDT 2003
Hello all,
I've googled a bit, and I've failed to find an answer to this question. Is it
possible to get a classes name from inside of a class? I.e.,
class Foo:
def print_classname(self):
# somehow print Foo
Basically, I'm using WebWare, and I need to pass the current servlet name
to a template. I don't want to have to hardcode the classname inside of
every servlet.
TIA,
Travis Whitton
More information about the Python-list
mailing list