"hello, world" of embedding/extending?

Michael P. Reilly arcege at shore.net
Thu Aug 5 16:27:39 CEST 1999


kj0 <kj0 at mailcity.com> wrote:

: What are the "hello, world" equivalents of embedding and extending
: Python (in/with C or C++)?

: More generally, where can I find source code didactic examples of
: embedding and extending Python?  (I write "didactic" because I'm not
: quite at the level yet of being able to read real-world,
: multiplatform, distribution-grade applications; rather, I'm interested
: in examples ranging from the "hello, world" level of complexity to the
: level of a full-blown useful application that someone may write for
: personal use, i.e. not intended for wide distribution).

The basic equivalents are in the Demo/embed/ and Demo/extend/ directories
of the source distribution.  For full blown extensions just take a look
at any of the C modules in the Modules/ directory.

There is documentation for embedding Python at 
  http://www.python.org/doc/current/ext/embedding.html and
  http://www.python.org/doc/current/api/veryhigh.html
And for extending at
  http://www.python.org/doc/current/ext/ext.html and
  http://www.python.org/doc/current/api/api.html and
  http://starship.python.net/crew/arcege/extwriting/pyext.html

The last webpage (tersely) describes how to make extension types.

  -Arcege





More information about the Python-list mailing list