I recently downloaded IMDbpy module.. When I do,
import imdb
help(imdb)
i dont get the full documentation.. I have to do
im = imdb.IMDb()
help(im)
to see the available methods. I dont like this console interface. Is there any better way of reading the doc. I mean all the doc related to module i开发者_运维问答mdb in one page..
Use pydoc
pydoc -w imdb
This will generate imdb.html in the same directory.
pydoc -p 9090
will start a HTTP server on port 9090, and you will be able to browse all documentation at http://localhost:9090/
in IPython you could do
[1]: import os
[2]: os?
< get the full documentation here >
# or you could do it on specific functions
[3]: os.uname
<built-in function>
[4]: os.uname?
< get the full documentation here >
# Incase of modules written in python, you could inspect source code by doing
[5]: import string
[6]: string??
< hows the source code of the module >
[7]: string.upper??
< shows the source code of the function >
精彩评论