Re: All names in the current module

2007-08-15 Thread Ian Clark
Ian Clark wrote: > Torsten Bronger wrote: >> Hallöchen! >> >> How can I get a list with all classes defined in the current module? >> Thank you! >> >> Tschö, >> Torsten. >> > > Assuming you want to see all classes in the re module: > > >>> import re > >>> help(re) #best way > >>> > >>> def is

Re: All names in the current module

2007-08-15 Thread Ian Clark
Torsten Bronger wrote: > Hallöchen! > > How can I get a list with all classes defined in the current module? > Thank you! > > Tschö, > Torsten. > Assuming you want to see all classes in the re module: >>> import re >>> help(re) #best way >>> >>> def isclass(cls): ... try: ...

Re: All names in the current module

2007-08-15 Thread Lawrence Oluyede
Fabio Z Tessitore <[EMAIL PROTECTED]> wrote: > to get names' list you can simply call globals() Not strictly true. globals() returns the current's scope global vars. If you import a module in the current scope globals() won't display the names inside it. -- Lawrence, oluyede.org - neropercaso.it

Re: All names in the current module

2007-08-15 Thread Fabio Z Tessitore
Il Wed, 15 Aug 2007 19:01:17 +0200, Lawrence Oluyede ha scritto: > Torsten Bronger <[EMAIL PROTECTED]> wrote: >> How can I get a list with all classes defined in the current module? >> Thank you! > > [EMAIL PROTECTED] ~ % cat > t.py > class A: pass > > [EMAIL PROTECTED] ~ % python > Python 2.5.1

Re: All names in the current module

2007-08-15 Thread Lawrence Oluyede
Torsten Bronger <[EMAIL PROTECTED]> wrote: > How can I get a list with all classes defined in the current module? > Thank you! [EMAIL PROTECTED] ~ % cat > t.py class A: pass [EMAIL PROTECTED] ~ % python Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04) [GCC 4.0.1 (Apple Computer, Inc. build 5367)

All names in the current module

2007-08-15 Thread Torsten Bronger
Hallöchen! How can I get a list with all classes defined in the current module? Thank you! Tschö, Torsten. -- Torsten Bronger, aquisgrana, europa vetus Jabber ID: [EMAIL PROTECTED] (See http://ime.webhop.org for ICQ, MSN, etc.) -- htt