[New-bugs-announce] [issue8398] Modules with a dot in the filename don't load

marco stamazza report at bugs.python.org
Wed Apr 14 15:15:01 CEST 2010


New submission from marco stamazza <giunghi at gmail.com>:

On my windows Xp system running Python 2.6 (from the (x,y) package) I tried to load a module named "GetMy.com_MOD.py". I kept receiving the error 
Traceback (most recent call last):
  File "D:\Docs\Futures-Strategy\StCHF\Test\GetMy.com_2.py", line 6, in <module>
    import GetMy.com_MOD
ImportError: No module named GetMy.com_MOD

Until I removed the dot renaming it to GetMycom_MOD.py, which works very nicely. Maybe the search should be smart enough to look for the last word after a dot to determine if the module exists or not?

Many thanks guys, Python rocks. marco

----------
components: Interpreter Core
messages: 103127
nosy: giunghi
severity: normal
status: open
title: Modules with a dot in the filename don't load
type: behavior
versions: Python 2.6

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


More information about the New-bugs-announce mailing list