On Mon, 2007-07-30 at 16:24 -0700, James Stroud wrote:
> Hello All,
> 
> I have a python module I wrote in C some time ago and I have since 
> forgotten how to use my functions and so I wanted to add some 
> doc-strings such that "help(function_name)" would give some help in the 
> interactive interpreter. [...] Is it possible to 
> embed this information in the C source directly [...] ?

Yes. A doc-string can be provided in the fourth slot of the PyMethodDef
entry. See e.g. /path/to/python/source/Modules/cPickle.c for a randomly
chosen module that has doc strings embedded in the C source.

HTH,

-- 
Carsten Haese
http://informixdb.sourceforge.net


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to