Domanda

Small simple question, but I cannot find the answer!

Is it possible to use PyDoc on a shared object used as a module in python ? Let say that I declare all the help in that *.so and I'm able to use them with help(module or class name). But I'd like to use PyDoc to create an HTML from these. So this way, I won't have to write the doc two times!

Let me know if it's possible, or if there's a small hack :)

Also, in the C files, I'm able to put the description of each function! But when I type help(my_class) I don't have a description of the class and then the list of function. What am I doing wrong ?

So, what I want is when I do this in the C files:

return PyObject_NEW(my_class, &my_class_type);

Later, in Python, after I loaded the module, I can do:

help(my_class)

and see the help, like it would do for help(int)!!

Thanks!

È stato utile?

Soluzione

So, I partially solved my problem.

I still can't use pydoc on an *.so file. But now, I can add modules, which is nice. Everything is available here: http://docs.python.org/extending/newtypes.html

But I'm still looking for the pydoc solution!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top