Extending Python with C/C++ on a win32 platform

Charles Medcoff cmedcoff at home.com
Wed May 23 12:03:12 EDT 2001


I'm probably not the best guy to respond but I've dabbled at this and
here is what I've learned.

I wrote a very simple extension using SWIG and I suggest that this is
an easier way to start.  I wrote some C++ classes and used swig to
generate code for an extension DLL and a shadow class (the SWIG doc's
explain this) and found that it was pretty straight forward.  Now my
"toy attempts" where some pretty simple examples but I found that I
didn't have to write any code specific to Python, SWIG just took care
of all of that.

I put it all into a VC++ 6 project and compiled.  Out popped my DLL, I
put it in the PYTHONPATH and I was off and running.

I'll go back and see if I can find my code and email it to you if I
find it.

Good Luck,
Charles Medcoff



More information about the Python-list mailing list