from __future__ import absolute_import issue
LittleGrasshopper
seattlehanks at yahoo.com
Wed May 20 19:18:02 EDT 2009
New to the group, this is my first post...
It appears that either absolute imports (or my brain) aren't working.
Given a module string.py which is in the same directory as a.py:
#File a.py
from __future__ import absolute_import
import string
print string # Module imported is string.py in current directory, not
standard library module
It imports the string module in the current directory, not the stirng
module defined in the standard library.
I've also noticed (by printing sys.path) that the current directory
seems to always be included as the first element in sys.path, even
when absolute_import is used.
Any help appreciated.
More information about the Python-list
mailing list