Re: creating simple Python scripting interfaces via C++

2007-01-11 Thread David Boddie
Ben Sizer wrote: > And is there anywhere else more appropriate that I should be asking > this question, given the lack of responses to this and my other embedding > topic so far? You could try asking on the C++ SIG mailing list at python.org: http://mail.python.org/mailman/listinfo/c++-sig David

Re: creating simple Python scripting interfaces via C++

2007-01-11 Thread Ben Sizer
Ok, my first attempt at this creates proxy objects in Python, and stores a pointer to the C++ instance in the Python object. I cast that pointer to an int and pass it as a single parameter to the object's __init__ function. static PyObject* Actor_init(PyObject *self, PyObject *args) { PyObject

creating simple Python scripting interfaces via C++

2007-01-08 Thread Ben Sizer
I have Python embedded in a C++ application (yes, yes, I know, I'd prefer it the other way around too) and essentially need to expose some read-only values and functions to Python so it can be used to script the host application. When scripting a similar app in TCL, it's possible to associate each