
Thanks for the answer. I did what you told me after the module's initialisation, it compiles well, however when I try to load my module with python it throws the error: TypeError: can't set attributes of built-in/extension type 'sfColor' Any idea?
On Dec 27, 2007 12:53 PM, Gustavo Carneiro <gjcarneiro@gmail.com> wrote:

On 27/12/2007, Remi K. <remi.k2620@gmail.com> wrote:
OK, maybe that only works for types that can be subclassed.
Alternatively:
PyObject *enum_value = PyInt_FromLong(123); PyDict_SetItemString(FooBar_Type.tp_dict, "name", enum_value) Py_DECREF(enum_value);
On Dec 27, 2007 12:53 PM, Gustavo Carneiro <gjcarneiro@gmail.com> wrote:
-- Gustavo J. A. M. Carneiro INESC Porto, Telecommunications and Multimedia Unit "The universe is always one step beyond logic." -- Frank Herbert

On 27/12/2007, Remi K. <remi.k2620@gmail.com> wrote:
OK, maybe that only works for types that can be subclassed.
Alternatively:
PyObject *enum_value = PyInt_FromLong(123); PyDict_SetItemString(FooBar_Type.tp_dict, "name", enum_value) Py_DECREF(enum_value);
On Dec 27, 2007 12:53 PM, Gustavo Carneiro <gjcarneiro@gmail.com> wrote:
-- Gustavo J. A. M. Carneiro INESC Porto, Telecommunications and Multimedia Unit "The universe is always one step beyond logic." -- Frank Herbert
participants (2)
-
Gustavo Carneiro
-
Remi K.