[New-bugs-announce] [issue13043] Unexpected behavior of imp.find_module(".") with a package present in sys.path and also referenced in a .pth file

Arfrever Frehtes Taifersar Arahesis report at bugs.python.org
Sun Sep 25 09:08:28 CEST 2011


New submission from Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>:

# python3.3 -c 'import imp; print(imp.find_module("."))'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named '.'
# mkdir /usr/lib64/python3.3/site-packages/something
# touch /usr/lib64/python3.3/site-packages/something/__init__.py
# echo something > /usr/lib64/python3.3/site-packages/something.pth
# python3.3 -c 'import imp; print(imp.find_module("."))'
(None, '/usr/lib64/python3.3/site-packages/something/.', ('', '', 5))

----------
messages: 144519
nosy: Arfrever
priority: normal
severity: normal
status: open
title: Unexpected behavior of imp.find_module(".") with a package present in sys.path and also referenced in a .pth file
versions: Python 2.7, Python 3.2, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13043>
_______________________________________


More information about the New-bugs-announce mailing list