module not callable - why not?
aahz at pythoncraft.com
Sun Apr 18 21:45:52 CEST 2004
In article <8ef9bea6.0404180956.cd1a152 at posting.google.com>,
Hung Jung Lu <hungjunglu at yahoo.com> wrote:
>One more, I promise I'll stop.
>(i) For getting attributes by string names, for attributes of
>instances you do getattr(self, 'name'), for module attributes you do
>globals()['name']. I mention this because every once a month or so a
>newbie would ask how to get module level attributes by name.
That's not the only answer, and it's not the one I use:
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"I used to have a .sig but I found it impossible to please everyone..." --SFJ
More information about the Python-list