Re: Syntax error when importing a file which starts with a number

2009-03-23 Thread simon . woolf
> So in a sorted list of files, some of the project 1.2 files will > appear under 1-2 and others miles away under 1_2 ? And even if > the submitter is not so dopey, the submittee has two different > possibilities when looking for project 1.2's files? Brilliant! And > this is an educational

Re: Syntax error when importing a file which starts with a number

2009-03-23 Thread simon . woolf
Many thanks to all for explanations. I'm going to take everyone's advice and ignore the naming scheme (especially as, on rereading, the naming scheme is apparently only mandatory if you're using C or Maple, for some reason). Thanks again. Simon (For those interested: > Do you mean that some au

Re: Syntax error when importing a file which starts with a number

2009-03-23 Thread simon . woolf
Forgot to mention: I'm on Python 2.5.2, on Ubuntu 8.10. Simon -- http://mail.python.org/mailman/listinfo/python-list

Syntax error when importing a file which starts with a number

2009-03-23 Thread 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: >>> import foo ImportError: No module named foo >>> import 1foo File "", line 1 import 1fo