Set PyObject value from C extension

Allen Allen.Chenal at gmail.com
Mon Jun 11 23:09:30 EDT 2007


I have the PyObject pointers, and want to set different type of values
to them.

For example,

INT8 nValue1 = 0;
INT16 nValue2 = 1;
FLOAT32 fValue = 1.0f;

PyObject* var1 <= nValue1
PyObject* var2 <= nValue2
PyObject* var3 <= nValue3

How to do it?

Regards,
Allen Chen




More information about the Python-list mailing list