get PyObject* knowing its string name

Mr.M mrm at unknown.nospam
Fri Jan 29 12:00:34 EST 2010


I think this sounds like a stupid question, but I searched the C/Api doc 
and google but I wasn't able to find any hint:

how can I retrive PyObject pointer if I only know it's name?

What I'd like to do is something like this:

[code]
PyObject* obj = PyFindWhatImLookingFor("w.z.y.x");
[/code]

Of course if I know that w is a module, z is a class and so on I can 
search w dictionary than z members than...

But I wonder if there is a way to retrive without knowing what w.z.y.x 
means.

Thank you,

Luca.



More information about the Python-list mailing list