Relative imports in packages

2012-11-09 Thread Johannes Bauer
Hi list, I've these two minor problems which bothered me for quite some time, maybe you can help me. I'm using Python 3.2. For some project I have a component in its own package. Let's say the structure looks like this: pkg/__init__.py pkg/Foo.py pkg/Bar.py Foo.py and Bar.py contain their class

Re: Imports in Packages

2007-12-17 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > While working within a package...what is the 'best practice' way to do > your imports. > > a/__init__.py > a/one.py > a/two.py > a/b/__init__.py > a/b/cat.py > a/b/dog.py > a/c/cow.py > Suppose I am working in a/c/cow.py and I need something from a/b/ > dog.py. If a/

Imports in Packages

2007-12-17 Thread tjhnson
While working within a package...what is the 'best practice' way to do your imports. a/__init__.py a/one.py a/two.py a/b/__init__.py a/b/cat.py a/b/dog.py a/c/cow.py Suppose I am working in a/c/cow.py and I need something from a/b/ dog.py. If a/b/__init__.py contains what I need from dog.py, shou