Microsoft Visual C++ and pyton

mike mike at
Mon Jan 31 23:42:11 CET 2005

Thanks Chris..
I was also advised to build the python core (pythoncore.vcproj) with my
C++ program. By that way I would not have to load the python core
anymore during runtime. Is this a good approach?
I am currently using VC++ 7 and python 2.4.
- mike

Christopher De Vries wrote:
> On Sun, Jan 30, 2005 at 03:12:06PM -0800, mike wrote:
> > I am new with python.  Is it possible to have an MFC application
> > develop some module using python? what are the steps in doing this?
> > anybody give me a url or some documentation for this.. thanks..
> It is possible to embed python in a C or C++ application, enabling
you to call
> python functions from C. I would recommend reading "Extending and
Embedding the
> Python Interpreter" at for more
> information. If you are currently using Visual C++ 6.0, either stick
> Python 2.3 or read this: to
> learn how to build extensions for python 2.4 with the free VC++
> compiler. If you are already using version 7 of the Microsoft C++
compiler then
> you should have no problems with Python 2.4.
> I usually do not embed the interpreter, but I have written some
> modules... well, I should say I have used SWIG (
to create
> wrappers around some C libraries. For information (read: rants) on
> versus embedding see
> and .
> You can also use win32 python extensions to make your module
available through
> COM, but I don't know anything about that.
> Chris

More information about the Python-list mailing list