Python objects

John Hunter jdhunter at
Fri Jun 28 12:08:24 EDT 2002

>>>>> "Teja" == Teja Sastry <kurugant at> writes:

    Teja> Could anybody share their experience on how to call the C++
    Teja> variable to python, I'm not quite familiar with python . I
    Teja> see there is a way to declare that as a python object in C++
    Teja> program and export it to python. I would really appreciate
    Teja> if anybody can clarify me on how do this prgramming.

This is called 'Extending Python' and there is a helpful manual
written by  Guido van Rossum and Fred Drake:

There are tools to automate this process.  The boost python library is
probably the best; it's template based C++ library which has extensive
support for wrapping C++ classes in python  You may also want to look at
SWIG, which will generate python extensions for
C/C++ code but has limited support for some C++ features.

There are more ....

Have fun,
John Hunter

More information about the Python-list mailing list