Antoine Pitrou pit...@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
New submission from Phillip M. Feldman pfeld...@verizon.net:
It appears that there is currently no way to import from a file whose
name contains a hyphen or blank. This makes it difficult to encode a
version number or date in the file name. The solution that I favor
would be to allow the name