Extending/Embedding Confusion

Jane & Carl janencarl at aznex.net
Fri Aug 4 23:54:08 EDT 2006


I'm going through a bit of this myself.

What I've found useful is downloading the source to Python and comparing modules that I use a lot that are written in C (in my case datetime) and see how they are coded.  Also, if I am thinking of using a C API function to do something, I grep or use Windows search in the code directories to see how the expert core Python coders use it and how often.

This may not help much, but it might give you some ideas.  Reference counting, if you're not experienced at it (I am not) is a whole topic on top of just coding something that will compile and run without crashing the interpreter.  The same goes for memory leaks.

Good luck.  Hopefully someone with a bit more experience can give you some more guidance.

Carl Trachte


"jeremito" <jeremit0 at gmail.com> wrote in message news:1154717474.528297.285240 at i42g2000cwa.googlegroups.com...
>I am trying to learn how to extend and/or embed Python.  I have looked
> at the document "Extending and Embedding the Python Interpreter" and
> also "Python/C API Reference Manual.  In the examples shown in
> "Extending..." there are some things I ma not familiar with so I turn
> to the index in the Reference Manual, but they are not listed.  For
> example, PyEval_CallObject and PyDict_GetAttrString.  My question is
> this: Is the documentation out of date or is the index not complete?
> Where can I get information about these things?
> 
> Secondly, I am really struggling with understanding how to Extend/Embed
> Python.  The examples given in the documentation are not as helpful as
> I would hope.  Does anyone know of additional examples on the web that
> will shed some light on this issue?  I have tried Google, but haven't
> yet been successful in finding additional examples that help.
> Thanks,
> Jeremy
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060804/5d51ab8a/attachment.html>


More information about the Python-list mailing list