"Jeff Petkau" <jpet at eskimo.com> wrote in message news:CXaA6.1200$fP5.449625 at paloalto-snr1.gtei.net... > For avoiding import statements, you could write something > like this: > > class ModuleGetter: > def __getattr__(self,name): > if name.startswith('__'): > raise AttributeError > return __import__(name) > module = ModuleGetter() This won't work if the module you want is in another package. -- Rainer Deyke (root at rainerdeyke.com) Shareware computer games - http://rainerdeyke.com "In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4