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

kleistereimer at gmx.de kleistereimer at gmx.de
Mon Feb 19 13:16:45 EST 2001


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))

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++.

i found references to a 'compile.py' which generates vc6 project-files.
but it's not available anymore. (use distutils everyone tells me..)
and i wont use outdated tools..

the documentation of distutils is not very clear.
and the examples-pages are empty.

all i need is a minimal example where a c++ class
is interfaced to python, and compiled to a dll
using bc, or vc.
at best all driven by distutils to make it standart-conform.

distutils seem to encapsulate compilers, so
maybe i'm able to generate the dll using distutils?

or am i completely wrong?
please point me to some information! THANK YOU!!

-- 
Sent through GMX FreeMail - http://www.gmx.net





More information about the Python-list mailing list