Module Browsing?
Nick Perkins
nperkins7 at home.com
Tue May 8 18:30:16 EDT 2001
I often find myself doing the following:
1) hear about a cool module
2) install it, or (more often),
find that i already have it (but didn't know about it)
3) >>>import cool
4) >>>dir(cool)
5) >>>cool.something(
(..see if IDLE shows an informative tool tip)
5) if it does, it's a function, i try it out
6) if not, it's a value, i see what it is
7) if the value is an object, i dir() it....
What I want to know is:
Is there an easier way to 'browse' a module from the command line?
I would like to able to (quickly) see module values and their type,
module functions and their parameters and doc strings, etc.
Is there a way to get a list of modules that i have installed?
If i wrote a script to do this, how would it work?
e.g.( walk sys.path, list all .py files, etc..)
( but i'm sure it has been done, i just don't understand
how modules work well enough )
...here's another thing:
can i import a module that is not on the sys.path
by giving it's full path?
More information about the Python-list
mailing list