module confusion
rjcarr
rjcarr at gmail.com
Mon Oct 1 23:03:10 EDT 2007
Sorry if this is a completely newbie question ...
I was trying to get information about the logging.handlers module, so
I imported logging, and tried dir(logging.handlers), but got:
AttributeError: 'module' object has no attribute 'handlers'
The only experience I have in modules is os and os.path ... if I do
the same thing, simply import os and then type dir(os.path), it
displays the contents as expected.
So my question is ... why are they different? I mean, in terms of
designing these modules, how would you go about getting a sub-module
in your name space? And on the other side, how would you go about
getting it out?
Thanks!
More information about the Python-list
mailing list