Re: Other classes in a module

2007-03-26 Thread Bruno Desthuilliers
Daniel Nogradi a écrit : >> Can an instance of a class in a module, in any simple way find out which >> other classes that exists in said module ? > > > # module x ## > class c1: >pass > > class c2: >pass > ### > > > Python 2.5 (r25:51908, Nov 1 2006, 1

Re: Other classes in a module

2007-03-25 Thread Daniel Nogradi
> Can an instance of a class in a module, in any simple way find out which > other classes that exists in said module ? # module x ## class c1: pass class c2: pass ### Python 2.5 (r25:51908, Nov 1 2006, 11:42:37) [GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3

Re: Other classes in a module

2007-03-25 Thread Peter Otten
Roland Hedberg wrote: > Can an instance of a class in a module, in any simple way find out which > other classes that exists in said module ? set(v for v in globals().values() if inspect.isclass(v) and v.__module__ == __name__) Peter -- http://mail.python.org/mailman/listinfo/python-list

Other classes in a module

2007-03-25 Thread Roland Hedberg
Hi! Can an instance of a class in a module, in any simple way find out which other classes that exists in said module ? -- Roland -- http://mail.python.org/mailman/listinfo/python-list