I'm probably overlooking something simple. Given an instance of a class, I'd like to get just the class name. For example:
class Foooo: pass
instance = Foooo()
print("instance.__class__ = "+str(instance.__class__))
print("Just the class name: "+str(instance.__class__).split(".")[-1][:-2])
This gives the following output:
instance.__class__ = <class '__main__.Foooo'>
Just the class name: Foooo
Is there something simpler than
str(instance.__class__).split(".")[-1][:-2]?
I'm in Python 3.2 if that helps...