Writing Class Browser etc for Python

Gerald Klix Gerald.Klix at klix.ch
Wed Aug 7 10:15:42 EDT 2002

The "inspect" module was added to Python 2.1 for exactly this purpose.
Take a look at "http://www.python.org/doc/current/lib/module-inspect.html".


"Bernhard Glück" <jglueck at vol.at> schrieb im Newsbeitrag
news:f3cb8b47.0208070546.48e4f079 at posting.google.com...
> Hi
> I am currently investigating if i can implement Python2.2 as our
> primary scripting language for our new application/multimedia
> architecture. I am Python newbie, so please bear with me ( I am only
> concerned with the API for Extending/Embedding Python in C/C++ )
> I need to know if and how it would be possible to write some sort of
> class browser in C++.
> In our architecture there are only "Actor" classes which "do
> something" in the world. All classes derive from this base class in
> C++. Now i want to extend this class hierarchy with python classes so
> that it is allowed to derive from any Actor derived C++ class in
> Python too. This should not be a real problem. However  all Actor
> derived classes need to be inspected and instantiated in our Editor
> tool. Having a class browser of the C++ classes is very easy with out
> RTTI Type system , however now i also need to know ALL Python classes
> currently in memory which derive directly or indirectly from the C++
> Actor, as well as know their methods and variables.
> How can i achieve this using the Python C API ? Or is it possible ?
> Or should i search for another scripting language?
> Thanks in advance.

More information about the Python-list mailing list