views:

69

answers:

2

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 imdb in one page..

+2  A: 

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/

N 1.1
I tried.. But, still I am not getting the methods of "im" in the doc html
shadyabhi
I still didnt get the methods of "im" in the doc.. Why was the answer upvoted...?
shadyabhi
did you try `pydoc -p` ?
N 1.1
what function you are not able to see in `pydoc -p` ? I can see company, person, movie, etc classes with all functions in it.
N 1.1
sorry, if this is silly.. But, I am still not seeing the method "ia.search_movie()" in the docs..
shadyabhi
But, i can see the documentation in bpython for "search_movie"...
shadyabhi
@Shadyabhi: the documentation for above method can be found at 'Parser(package) -> http(package)' or http://localhost:1234/imdb.parser.http.html (if your server is running). I have no idea why the documentation is there, but it is present :).
N 1.1
Oh. I got it.. pydoc can be used to see the full documentation. You just have to search for the proper place.. Thanx
shadyabhi
+1  A: 

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 >
jeffjose