New submission from Bruce Frederiksen <[EMAIL PROTECTED]>:

Try this to reproduce error:

$ mkdir -p test/email
$ cd test
$ touch email/
$ cat <<! >
from __future__ import absolute_import
import smtplib
$ python
>>> import foo
  File "/usr/lib/python2.6/", line 46, in <module>
    import email.utils
ImportError: No module named utils

If you rename the email subdirectory, it will find email.utils where it
should find it.

Strangely, this doesn't happen if you have an 'os' subdirectory and try
to import shlex, which does: import os.path ??

components: Interpreter Core
messages: 63993
nosy: dangyogi
severity: normal
status: open
title: absolute import doesn't work for standard python modules
type: behavior
versions: Python 2.5, Python 2.6, Python 3.0

Python-bugs-list mailing list 

Reply via email to