Pergunta

Eu baixei recentemente o módulo imdbpy .. quando eu fizer,

import imdb
help(imdb)

eu não recebo a documentação completa .. eu tenho que fazer

im = imdb.IMDb()
help(im)

Para ver os métodos disponíveis. Eu não gosto desta interface do console. Existe alguma maneira melhor de ler o Doc. Quero dizer todo o médico relacionado a Módulo IMDB em uma página..

Foi útil?

Solução

Usar pydoc

pydoc -w imdb

Isso gerará imdb.html no mesmo diretório.


pydoc -p 9090 Iniciará um servidor HTTP na porta 9090 e você poderá procurar toda a documentação em http: // localhost: 9090/

Outras dicas

dentro Ipython você poderia fazer

[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 >
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top