简体   繁体   中英

PyDoc on a shared object

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!

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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM