[Python-ideas] Import and '..', '../..' in serach path.
Ron Adam
rrr at ronadam.com
Thu Feb 1 01:18:08 CET 2007
Ron Adam wrote:
> What is needed is to append the actual root package location to the front os
> sys.path. If absolute imports are used for intra-package imports, then there is
> not chance of shadowing the library by doing this.
Correction, it's still possible to shadow the library. At least in 2.5. Maybe
after 2.7 it won't. But it doesn't make anything worse.
A question that may be off topic here but is somewhat related.
How can I tell the difference when running a script with/without:
from __future__ import absolute_import
It doesn't seem to make any difference on my computer.
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win
32
Ron
More information about the Python-ideas
mailing list