[C++-sig] instantiating python objects within C++

Stefan Seefeld stefan.seefeld at orthosoft.ca
Fri May 23 20:34:05 CEST 2003


hi there,

I'v the feeling I'm not seeing the obvious, but...


...how can I instantiate a python object in C++ ?

I'v defined a C++ class, wrapped it into a python
class, and now want to call a python function
using an object of that type. Read: I want to
provide python 'callbacks' that let people interact
with my C++ application, but in python.

I'v set up the python interpreter and can run it
successfully. All I'm missing is a way to instantiate
objects of said type and inject them into the namespace
that is passed to the PyRun_File call...

Thanks a lot,
		Stefan





More information about the Cplusplus-sig mailing list