On 06/14/2010 02:30 AM, moerchendiser2k3 wrote: > PyErr_WarnEx(PyExc_DeprecationWarning, "foo deprecated. use fuzz", > 1); > > But where can I write this? With Py_InitModule4 I can just > pass a list of functions but no real execution part which > is executed when a module is imported.
This is Python 2.x, right? I'm only familiar with Python 3 extension writing, but there shouldn't have been that much change... Where do you call the Py_InitModule4? I would have expected you call it in your initfoo function - which is also a good place to issue a warning. - the initfoo (or PyInit_foo) function is called when the module is first imported. -- http://mail.python.org/mailman/listinfo/python-list