Is there an elegant way to dir() module from inside?

volcano Mark.Geyzer at gmail.com
Thu Aug 24 17:10:08 EDT 2006


Sion Arrowsmith wrote:
> volcano <Mark.Geyzer at gmail.com> wrote:
> >I am looking for a way to discover which classes a module contains from
> >"inside". I am building a testing class that should, when instatntiated
> >within any module, locate certain classes within the containing module.
>
> globals().keys()
>
> --
> \S -- siona at chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
>   ___  |  "Frankly I have no feelings towards penguins one way or the other"
>   \X/  |    -- Arthur C. Clarke
>    her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump

thanks, it worked!




More information about the Python-list mailing list