relative import broken?

Alan Isaac aisaac at american.edu
Tue May 1 20:23:01 EDT 2007


> "Alex Martelli" <aleax at mac.com> wrote in message
> news:1hxeg2v.1ct59rv3oyq87N%aleax at mac.com...
> > I don't know of any "pretty" way -- I'd do it by path manipulation
> > (finding mypackage from os.path.abspath(__file__) and inserting its
> > _parent_ directory in sys.path).
>

"Alan Isaac" <aisaac at american.edu> wrote in message
news:7nNZh.4420$st3.1414 at trnddc06...
> Yes, that seems to be the standard solution.
> I find it ugly.

Just to confirm that I am right to find it ugly:
does this not clearly introduce the possibility of name clashes?
Or am I overlooking some trick?

Alan Isaac





More information about the Python-list mailing list