Re: [C++-sig] Converintg C++ object to python object

2009-12-08 Thread Jadhav, Alok
When I pass a C++ object to Python function, I want to be able to use that object using its Proxy class in the python code. How can I achieve that? Regards, Alok -Original Message- From: cplusplus-sig-bounces+alok.jadhav=credit-suisse@python.org [mailto:cplusplus-sig-bounces+alok.

[C++-sig] Converintg C++ object to python object

2009-12-08 Thread Jadhav, Alok
In my C++ callback function below [code] static void PythonCallBack(RFAMessage *msg, void *clientdata) { PyObject *func, *arglist; PyGILState_STATE state; state = PyGILState_Ensure(); func = (PyObject *) clientdata; // Get Python function RFAMessageWrapper msg2(msg);

Re: [C++-sig] [Py++] Generate Python code for ctypes?

2009-12-08 Thread Roman Yakovenko
On Tue, Dec 8, 2009 at 5:55 PM, Nikolaus Rath wrote: > > Hello, > > Is it possible to use Py++ to "convert" structures from a C header,  say > > , > | struct flock > |   { > |     short int l_type;   /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.  */ > |     short int l_whence; /* Where `l_sta

[C++-sig] [Py++] Generate Python code for ctypes?

2009-12-08 Thread Nikolaus Rath
Hello, Is it possible to use Py++ to "convert" structures from a C header, say , | struct flock | { | short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ | short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ | #ifndef __USE_FILE_OFFSET64 |