Finding all classes in a module

Jim Meier jim at dsdd.org
Sat Aug 10 01:51:55 CEST 2002


On Fri, 09 Aug 2002 08:31:03 -0600, Emile van Sebille wrote:

> "Donnal Walter" <donnal at donnal.net> wrote in message
> news:918bc22f.0208090610.6c729bbd at posting.google.com...
>> Jim Meier <jim at dsdd.org wrote in message news:<LwJ49.121080> import m
>> >
>> > for k,v in m.__dict__:
>> > if isintance(v, types.ClassType):
>> > print k
>>
>>>> for k,v in sys.__dict__: print k,v; break
> ...
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> ValueError: too many values to unpack
>>>> for k,v in sys.__dict__.items(): print k,v; break
> ...
> setrecursionlimit <built-in function setrecursionlimit>
>>>>


Whoops, sorry.

-Jim



More information about the Python-list mailing list