Nick Coghlan <[EMAIL PROTECTED]> added the comment:

Running the interactive interpreter like that places the current
directory on sys.path, so it *is* doing an absolute import of your
pseudo email package. (If it didn't do that, your test would fail at the
"import foo" line)

Instead of cd'ing into test the way you did, invoke the interpreter from
the next directory up and do an import of '', and you should see
the absolute imports in the foo module having the desired effect.

(I expect the reason you didn't run into this for the os module is
because the os module is bootstrapped quite early in Python's startup
process, so you'd have to try really hard to get it to see something
other than the builtin standard library version of os)

nosy: +ncoghlan
resolution:  -> invalid
status: open -> closed

Python-bugs-list mailing list 

Reply via email to