<scott.bronson.nelson <at> gmail.com> writes: > > Can someone explain to me what's going on here? > > >>> __import__('some.package.module', {}, {}, []) > <module 'some' from 'some/__init__.py'> > >>> __import__('some.package.module', {}, {}, ['']) > <module 'some.package.module' from 'some/package/module.py'>
As documented [1], unless fromlist is not empty, the first module is returned. Use the solution at the end of the docs to get around this. [1] http://docs.python.org/library/functions.html#__import__ -- http://mail.python.org/mailman/listinfo/python-list