Traceback ( most recent call last) when importing modules

Posted by subbu2687 on 2012-07-26 09:53


I installed ActiveState ActivePython 2.7 (32 bit) in Windows 7 32 bit machine.

I created a sample module and when i tried to import it im getting the below error.

Traceback (most recent call last):
File "", line 1, in
import sample
File "C:\Python27\", line 1
ActivePython (ActiveState Software Inc.) based on
SyntaxError: invalid syntax

I checked for previous solution.

1) Tried rebooting my machine
2) Changed the environment variable

But still the issue is not resolved.

Please help in resolving this issue.


ActiveState Staff
Mon, 2012-08-13 12:49

The 2.7 documentation has a tutorial, with a section on modules.

Walking through the tutorial may help you find what's going wrong.