__import__ Confusion

scott.bronson.nelson at gmail.com scott.bronson.nelson at gmail.com
Thu Feb 12 04:02:22 CET 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