And now for something completely boneheaded...
Skip Montanaro
skip at mojam.com
Wed Sep 8 11:09:32 EDT 1999
Warren> So with a given module, once imported, what is the way by which
Warren> I can find out what's defined in the module and, ideally, how to
Warren> access it?
Try
import sys
dir(sys)
dir() works on just about everything these days, so you can pass it classes,
instances, strings, etc. Not everything has something useful to return, so
you may get some empty lists back (ints, float and strings come to mind).
howdy-ly y'rs
Skip Montanaro | http://www.mojam.com/
skip at mojam.com | http://www.musi-cal.com/~skip/
847-971-7098 | Python: Programming the way Guido indented...
More information about the Python-list
mailing list