Documenting extension modules?
Francois De Serres
fdeserres at gmx.net
Fri Jul 15 07:52:30 EDT 2005
Robert Kern wrote:
>Francois De Serres wrote:
>
>
>>Hiho,
>>
>>I can't seem to find a proper way to document my extension module.
>>Following the C API doc:
>>
>>static PyMethodDef ioMethods[] = {
>> {"o_count", o_count, METH_VARARGS, "Return the count of available
>>MIDI outputs."},
>>....
>>}
>>
>>lacks:
>>a) module level documentation
>>
>>
>
>In your init<module> function, assign a PyStr object to __doc__.
>
>
>
>>b) function parameters
>>
>>
>
>Add that information to your docstring. I don't think that there is a
>way to get this information via inspect.
>
>
>
>>Also, I'd like to know if there's a typical format for the help string
>>(but in C), compatible with docstring's
>>"""short desription
>>
>>long description"""
>>
>>
>
>char *o_count__doc__;
>char *o_count__doc__ = "short description\n"\
>"\n"\
>"long description\n";
>
>
>
Mucho thankees Robert.
More information about the Python-list
mailing list