relative import broken?
- From: "test" <juice@xxxxxxxxxxxxx>
- Date: Wed, 30 Apr 2008 15:41:26 +0200
basic noob question here.
i am trying to reference a package, i have the structure:
mypack/
__init__.py
test.py
subdir1/
__init__.py
mod1.py
subdir2/
__init__.py
mod2.py
can someone please tell me why the statement:
from mypack.subdir1.mod1 import *
does NOT work from mod2.py nor from test.py?
instead, if i use:
from subdir1.mod1 import *
it works perfectly from test.py.
.....?
thank you,
aj.
.
- Follow-Ups:
- Re: relative import broken?
- From: Peter Otten
- Re: relative import broken?
- Prev by Date: Re: how to convert a multiline string to an anonymous function?
- Next by Date: Re: Python(2.5) reads an input file FASTER than pure C(Mingw)
- Previous by thread: Essentio CS5110 the first produced desktop from asus
- Next by thread: Re: relative import broken?
- Index(es):