Message3451

Author wesleys
Recipients nriley, wesleys
Date 2008-08-27.03:47:30
SpamBayes Score 1.02848e-05
Marked as misclassified No
Message-id <1219808851.22.0.0922145670942.issue1111@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks,

had to change my code for loading the modules to:

        # Work around for http://bugs.jython.org/issue1111
        # mod = __import__(modules, {}, {}, [ filename ], -1)
        mod = __import__(module_name)
        components = module_name.split('.')
        for comp in components[1:]:
            mod = getattr(mod, comp)

Works for 2.2.1 and 2.5a1.

BTW, from the documentation regarding __import__ I saw these notes:
Changed in version 2.5: The level parameter was added. Changed in
version 2.5: Keyword support for parameters was added.

Don't know if level is supported by jython, but just in case :)
History
Date User Action Args
2008-08-27 03:47:31wesleyssetmessageid: <1219808851.22.0.0922145670942.issue1111@psf.upfronthosting.co.za>
2008-08-27 03:47:31wesleyssetrecipients: + wesleys, nriley
2008-08-27 03:47:31wesleyslinkissue1111 messages
2008-08-27 03:47:30wesleyscreate