getting list of all available modules
Christos TZOTZIOY Georgiou
tzot at sil-tec.gr
Tue Jun 21 06:31:33 EDT 2005
On Tue, 21 Jun 2005 01:33:06 GMT, rumours say that Benjamin Rutt
<rutt.4 at osu.edu> might have written:
>I note that the help() function of interactive python can determine
>all available modules:
<snip>
>I want to do the same (get all such modules in a python list); how can
>I do so? Or where is the code for the REPL for help() itself so I can
>find out myself?
Try browsing the site.py file in your standard lib directory; there's a
_Helper class that is what you are looking for. help is an instance of
_Helper, as you can see by typing in the interactive prompt:
>>> type(help)
<class 'site._Helper'>
--
TZOTZIOY, I speak England very best.
"Be strict when sending and tolerant when receiving." (from RFC1958)
I really should keep that in mind when talking with people, actually...
More information about the Python-list
mailing list