Ask Your Question

Revision history [back]

For the record, this was resolved by email. The problem was that the imported filename was not A.py but rather a name that contained dashes like A-1.py. The syntax error was due to 'import A-1' not being valid Python. Python files can be named using dashes in the name but then can only be run directly and not imported. Using underscores as in A_1.py solves the problem since 'import A_1' is valid syntax.