[Distutils] docs/examples for building windows modules (dll's) from c++. distutils ???

Thomas Heller thomas.heller at ion-tof.com
Mon Feb 19 13:25:21 EST 2001


kleistereimer wrote:

> hi!
> 
> i'm a c++ professional, but i have converted to python now. (wx..)
> my 2 problems are: 
> 
> 1. i have lot's of hardware-dependend c++ classes, i need to extend
>    python with.
> 2. i need to make a (binary) installer for linux and windows.
>    (at best not releasing the sources, and including a python interpreter
>    already. (i can do this with a modified py2exe already))

As the author of py2exe I would certainly like to hear more about this!

> 
> I suppose the distutils will (at least) help with both (?) problems.
> (i like my software to be standart-conform)
> 
> 1:
> there are examples and docs to extend python with c-code,
> but not for c++ classes.
> so how to wrap c++ code to make it callable from python?
> (c++ code means a complete class hierarchy in aprox 30 files
> which contains one interface class and one iterator class on top,
> which both needs to be accessible from python)
> 
> 2:
> next thing is how to compile the wrapped c++.
> 


Take a look at SWIG: http://www.swig.org/

Distutils contains (in an early stage) support for swig.

Thomas





More information about the Python-list mailing list