[issue7411] allow import from file having name containing hyphen or blank

Antoine Pitrou report at bugs.python.org
Mon Nov 30 16:51:23 CET 2009


Antoine Pitrou <pitrou at free.fr> added the comment:

Yes, there is:

$ cat > "file-with-hyphen and space.py"
x = 5

$ python
Python 2.6.4 (r264:75706, Oct 27 2009, 15:50:27) 
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> mod = __import__("file-with-hyphen and space")
>>> mod.x
5
>>>

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

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


More information about the Python-bugs-list mailing list