سؤال

لقد قمت مؤخرا بتنزيل وحدة IMDBPY .. عندما أفعل،

import imdb
help(imdb)

أنا لا أحصل على الوثائق الكاملة .. يجب أن أفعل

im = imdb.IMDb()
help(im)

لرؤية الأساليب المتاحة. أنا لا أحب واجهة وحدة التحكم هذه. هل هناك أي طريقة أفضل لقراءة الوثيقة. أعني كل الوثيقة المتعلقة وحدة IMDB في صفحة واحدة..

هل كانت مفيدة؟

المحلول

يستخدم بيدوك

pydoc -w imdb

سيؤدي هذا إلى إنشاء IMDB.HTML في نفس الدليل.


pydoc -p 9090 سيبدأ خادم HTTP على المنفذ 9090، وسوف تكون قادرا على تصفح جميع الوثائق في http: // localhost: 9090 /

نصائح أخرى

في ipython. يمكنك القيام بذلك

[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 >
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top