__import__ Confusion

scott.bronson.nelson at gmail.com scott.bronson.nelson at gmail.com
Wed Feb 11 22:02:22 EST 2009


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'>

(Note that '' is two single quotes)

Thanks,
Scott



More information about the Python-list mailing list