[Tutor] Accessing C library (*.a) functions from Python

sessile@in-gen.net sessile@in-gen.net
Sun, 04 Jul 1999 13:11:21 -0400


Hello all,

This is my first attempt at a Python extension...

I would like to be able to use Python rather than C to access
the functions contained within a library file named "ttslib.a".
From the "tts" documentation, I know that the "tts" functions
can be used within a C program by #defining "ttsdef.h" (which
defines a number of return codes) and then linking "ttslib.a"
into the program.  No source code is available on the "ttslib"
side of things (it's part of a proprietary system) though all
of the "tts" functions are documented.

After reading the Extending and Embedding Tutorial, I do not see
how to tie Python into an existing API without access to source
(and given my current level of understanding, probably couldn't
do it even if I had the source :-/ ).  Advice please?  Am I
missing a basic concept here?

I can forward additional "tts" documentation, including an example
C program that uses some of the "libtts.a" functions, to anyone
willing to help.

--
E-Mail:  sessile@in-gen.net
  "I don't want the world... I just want your half."
                   -- TMBG (Anna Ng)