How to GetClassName in Python

Gerrit Holl gerrit at nl.linux.org
Fri Nov 28 10:54:49 CET 2003


bala wrote:
> Hi,
>     I want to know how to getclassname of application from python..In python There is no method like GetClassName...
> Is there any other Method ...I kindly give some example in python..
>         If anyone answer to the above problem....I will be very thankfull to you...

I think you are looking for the __class__ attribute. Each object has a
__class__ attribute referring to the class of the object: (3).__class__
refers to int, MyClass().__class__ refers to MyClass, and int.__class__
refers to type.

yours,
Gerrit.

-- 
25. If fire break out in a house, and some one who comes to put it out
cast his eye upon the property of the owner of the house, and take the
property of the master of the house, he shall be thrown into that
self-same fire.
          -- 1780 BC, Hammurabi, Code of Law
-- 
Asperger's Syndrome - a personal approach:
	http://people.nl.linux.org/~gerrit/english/





More information about the Python-list mailing list