Import w/ '.' syntax

Jeff McNeil jeff at
Fri May 15 17:20:17 CEST 2009

On May 15, 10:50 am, mrstevegross <mrstevegr... at> wrote:
> Remind me: is it possible to craft an import statement like this:
>   import
> If so, what's going on here exactly? Is Python looking for a module
> called 'bar', in a directory called 'foo', in a search path somewhere?
> Or am I totally misunderstanding the import semantics.
> Thanks,
> --Steve

In that specific case, you're looking for a module 'bar' in the 'foo'
package, which should be located somewhere on sys.path.

That covers it pretty well.



More information about the Python-list mailing list