On Thu, 29 Mar 2007 15:43:46 -0300 "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> Surely there is a ./resources/__init__.py too? There sure is: ./resources/__init__.py is: __all__ = ['simple', 'other'] > You may check if this is the case, looking at sys.modules I did look at sys.modules but I wasn't sure what to look for. There was a log module in the list but what else should I look for? > Anyway you could import the package and lookup the module inside > using getattr: > > import resources > name = "simple" > module = getattr(resources, name) > self.rs = module.Resource() Since the ./resources/__init__.py does not actually import any of the modules below it, this trick won't work but just for an experiment, I'll change the code and try it. -- Mitko Haralanov [EMAIL PROTECTED] Senior Software Engineer 650.934.8064 System Interconnect Group http://www.qlogic.com ========================================== Disraeli was pretty close: actually, there are Lies, Damn lies, Statistics, Benchmarks, and Delivery dates. -- http://mail.python.org/mailman/listinfo/python-list