Re: Perplexed by the behavior of import

2012-01-10 Thread Peter Otten
Rod Kosloski wrote: > I'm perlexed by an apparent inconsistency in the behavior of the import > statement. > > First, the files. There is a simple package, pkg, containing two files: > mod.py and util.py, and a stand-alone module also named util.py: > >*** ./pkg/__init__.py *** >from mod

Perplexed by the behavior of import

2012-01-10 Thread Rod Kosloski
I'm perlexed by an apparent inconsistency in the behavior of the import statement. First, the files. There is a simple package, pkg, containing two files: mod.py and util.py, and a stand-alone module also named util.py: *** ./pkg/__init__.py *** from mod import * *** ./pkg/mod.py ***