S
simon.woolf
Hello, all.
I don't suppose anyone has any idea why it seems to be impossible to
import any file which starts with a number? You get a syntax error,
whether the file exists or not.
Try it yourself:
ImportError: No module named foo
File "<stdin>", line 1
import 1foo
^
SyntaxError: invalid syntax
Is this just me, or has anyone else run into it? Is it a known bug?
(If so, I can't find it on a bug tracker or in any Google searches).
It's a bit annoying, as I have an enforced naming scheme. Any way
round it?
Thanks in advance!
Simon
I don't suppose anyone has any idea why it seems to be impossible to
import any file which starts with a number? You get a syntax error,
whether the file exists or not.
Try it yourself:
ImportError: No module named foo
File "<stdin>", line 1
import 1foo
^
SyntaxError: invalid syntax
Is this just me, or has anyone else run into it? Is it a known bug?
(If so, I can't find it on a bug tracker or in any Google searches).
It's a bit annoying, as I have an enforced naming scheme. Any way
round it?
Thanks in advance!
Simon