How to reset document string

Anand K Rayudu anand at esi-india.com
Fri Aug 7 05:54:06 EDT 2009


Dear All,

We have extended and embedded python into my our application.
We exposed few APIs to python using

 Py_InitModule("myModuleName", myMethods);
where my methods are

static PyMethodDef VistaDbMethods[] = {
   { (char *)"myAPI",_myAPICFunctionPtr ,METH_VARARGS,"usage: MyHelp)" }


Now problem is ml_doc (Document string). Most of the time the strings 
given by development team is not descriptive enough, so support team 
want to enhance these docstring on need basis and supply to customer
The idea is we will provide get latest help option from application, 
which will contact our webserver or allow user to pick new help 
document,  which will re apply the help on fly.
 From then on our script editors will show the new enhanced help.
How do I achieve this.

I tried to change <Module>.<MyAPI>.__doc__ = "My new doc"

This failles as it is read only attribute.

Another approach could be calling  Py_InitModule("myModuleName", 
myMethods); with new help string. But It is not working,
So I am not sure what is the right way to do it

Thanks in advance for  all your kind help

Regards,
Anand






More information about the Python-list mailing list