Get dosctring without import

Diez B. Roggisch deets at nospam.web.de
Fri Feb 26 04:06:17 EST 2010


Am 26.02.10 09:55, schrieb Joan Miller:
> When a package is imported, it gets the dosctring to store it in
> *__doc__*.
>
> Does that funcion is built in python? because I would want use it to
> get the docstring without import a package

You'd need to write your own parser for that. All standard tools simply 
import, see another thread a few days ago where a user had problems with 
help on modules.

Also, without importing, you'd not get docstrings of C-extension-objects.

Diez



More information about the Python-list mailing list