newbie-question: extending python with c++
Siegfried Gonzi
siegfried.gonzi at kfunigraz.ac.at
Mon Apr 15 14:24:40 EDT 2002
Brian Quinlan wrote:
> Where need to link with Pythonxx.lib. But instead of this manual crap,
> you should just write a simple distutils setup script.
I ran into a similar problem: including an external C function in
Python. The SWIG manual is somewhat behind time and my first attempts
failed. I just then wrote to the developers (or mailinglist?) and they
explained me a "how to" with the assistance of distutils.
It was quite easy (even for me, and it was my first attempt ever, to
glue together applications).
The distutils-documentation is quite vague in this respect; if I hadn't
contacted the authors of SWIG, I would'nt have contemplated to use
distutils in order to prepare my C function for including in Python.
Maybe it is a good idea to contact the SWIG adress directly (it is
likely that someone can help you).
S. Gonzi
[Someone interested in the Bohren-Huffman Mie
(http://atol.ucsd.edu/%7Epflatau/scatlib/index.html) code? I made
successful the C wraper function for Python on Windows? It wouldn't be a
problem for me to give it to someone interested in or explain how I did
it]
More information about the Python-list
mailing list