__file__ for relative imports

Michael Hudson mwh at python.net
Thu Mar 21 06:59:15 EST 2002


Robin Becker <robin at jessikat.fsnet.co.uk> writes:

> Is there an obvious reason why modules imported from the current
> directory don't have an absolute pathname for __file__?

No.  I think there's a bug on sf about this.

It would be a bit of a pest to implement, I think, but I may be
missing something.

Cheers,
M.

-- 
 Two decades later, well-known hacker Henry Spencer described the 
 Perl scripting language as a "Swiss-Army chainsaw", intending to 
 convey his evaluation of the language as exceedingly powerful but 
 ugly and noisy and prone to belch noxious fumes.   -- the jargon file



More information about the Python-list mailing list