Re: adding new function

2010-06-23 Thread Christian Heimes
Am 22.06.2010 19:18, schrieb Terry Reedy: > On 6/22/2010 5:44 AM, Daniel Fetchinson wrote: >>> how can i simply add new functions to module after its initialization >>> (Py_InitModule())? I'm missing something like >>> PyModule_AddCFunction(). > > in Python, for modules written in python > > imp

Re: adding new function

2010-06-23 Thread Gabriel Genellina
En Tue, 22 Jun 2010 14:18:59 -0300, Terry Reedy escribió: On 6/22/2010 5:44 AM, Daniel Fetchinson wrote: how can i simply add new functions to module after its initialization (Py_InitModule())? I'm missing something like PyModule_AddCFunction(). in Python, for modules written in python imp

Re: adding new function

2010-06-22 Thread Terry Reedy
On 6/22/2010 5:44 AM, Daniel Fetchinson wrote: how can i simply add new functions to module after its initialization (Py_InitModule())? I'm missing something like PyModule_AddCFunction(). in Python, for modules written in python import mymod mymod.fname = somefunc #or setattr(mymod, namestrin

Re: [Python-Dev] adding new function

2010-06-22 Thread Daniel Fetchinson
> how can i simply add new functions to module after its initialization > (Py_InitModule())? I'm missing something like > PyModule_AddCFunction(). This type of question really belongs to python-list aka comp.lang.python which I CC-d now. Please keep the discussion on that list. Cheers, Daniel