Extracting attributes from modules
Carsten Geckeler
nospam at no.spam
Wed Dec 20 20:03:27 EST 2000
On Thu, 21 Dec 2000, Carsten Geckeler wrote:
[snip]
>
> Their probably not hidden, but mySphere is "only" an instance, so there
> may be attributes or methods of the class or the base classes. These
> attributes don't show up with the dir() command. Try the following:
>
> print dir(mySphere)
> print dir(mySphere.__class__)
> for bc in mySphere.__class__.__bases__:
> print dir(bc)
Forgot something: There is a possibility that there are attributes not
listed in any of the above, then their lookup is done by the __getattr__
method. In this case you have to take a look in the source (module, etc.)
or try to get a proper documentation.
Cheers, Carsten
--
Carsten Geckeler: carsten dot geckeler at gmx dot de
To get proper email-address replace `dot' and `at' by the corresponding symbols.
More information about the Python-list
mailing list