[python] how to get class name from a object?

Skull <[email protected]>
Newsgroups gmane.comp.lib.boost.langbinding
Message-ID <[email protected]>
Dear,

I have a problem to export a function:getClassName, my code like this:

in c++:
class MyObj
{
    ...
}

const char* getClassName(PyObject *obj) # or getClassName(object obj)
{
    # how to get class name from PyObject(or object)??? <== my problem
    ...
}

in python:

... print getName(MyObj)
... "MyObj"

Anyone could help me? thanks in advance.

-- 
- Skull


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.