La lectura de documentación de Python para módulos de 3 ª parte
-
19-09-2019 - |
Pregunta
Recientemente he descargado módulo IMDbpy .. Cuando lo haga,
import imdb
help(imdb)
i no obtener la documentación completa .. tengo que hacer
im = imdb.IMDb()
help(im)
para ver los métodos disponibles. No me gusta esta interfaz de la consola. ¿Hay alguna forma mejor de la lectura del documento. Me refiero a todo el documento relacionado a imdb módulo en una página. .
Solución
pydoc -w imdb
Esto generará imdb.html en el mismo directorio.
pydoc -p 9090
arrancará un servidor HTTP en el puerto 9090, y usted será capaz de navegar por toda la documentación en http: // localhost: 9090 /
Otros consejos
IPython que podría hacer
[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 bajo: CC-BY-SA con atribución
No afiliado a StackOverflow