[Tutor] Monty? (2.generation python)

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Tue, 2 Oct 2001 15:22:25 -0700 (PDT)


On Wed, 3 Oct 2001, [ISO-8859-1] Risto Per=E4nen wrote:

> How do I get information of internal structures of Python. I'm
> fiddling with a _HUGE_ game project which uses C++ as basic/root
> language. As we all know, python is fantastic scripting language but
> everytime you create new type with it the python requires
> recompilations.
>
> Furthermore, I haven't ever liked doing C++ with plain C :) So I
> really would like to use C++ without any goddamn macros as root
> language with project.
>=20
> On the other hand, python's syntax is easy to learn but powerfull
> enough so it's quite obvious choise for mentor :)
>=20
> Can anybody help or will I be slain down by pythoneers :)

Ah, a C/C++ programmer.  We shall not shun you.

Check out the Python/C API:

    http://www.python.org/doc/current/api/api.html

as well as the Extending and Embedding Document:

    http://www.python.org/doc/current/ext/ext.html

Both are very useful at digging at Python's internals.  The best thing to
do, though, is to take a look at Python source code itself, and see how
they're implementing things.

If you have any questions, please feel free to ask them.  Although what
you're asking about is something of an advanced topic, a few of us here
have some experience with Python extensions.  You'll also find the main
comp.lang.python newsgroup useful on asking questions on Python internals.