Reading Python documentation for third-party modules

I recently downloaded the IMDbpy module. When i do this

import imdb help(imdb) 

I do not get the full documentation. I need to do

 im = imdb.IMDb() help(im) 

to view the available methods. I do not like this console interface. Is there a better way to read a document. I mean all the documents related to the imdb module on one page. .

+4
source share
2 answers

Use pydoc

 pydoc -w imdb 

This will create imdb.html in the same directory.


pydoc -p 9090 will launch an HTTP server on port 9090, and you can view all the documentation at http: // localhost: 9090 /

+10
source

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 > 
+1
source

Source: https://habr.com/ru/post/1304013/


All Articles