Reputation: 13
I'm new to python and have installed Python2.6 directory address of python is "C:\Python26"
I tried to use import ctypes
I'm getting below errors
Traceback (most recent call last):
File "C:\Python26\Lib\msdecmiolib\__init__.py", line 22, in <module>
import ctypes
File "C:\Python26\Lib\ctypes\__init__.py", line 25
5DEFAULT_MODE = RTLD_LOCAL
^
SyntaxError: invalid syntax.
Upvotes: 1
Views: 445
Reputation: 353569
Something's wrong with your Python installation; that line in ctypes/__init__.py
should simply read
DEFAULT_MODE = RTLD_LOCAL
It's hard to imagine how that could have happened other than accidentally -- maybe you opened the file to look at it and accidentally hit 5
before saving? Anyway, you can either fix it yourself and see what happens or if you'd prefer reinstall Python.
(Possibly upgrading to at least 2.7 while you're at it, which would be a good idea unless there's some peculiar reason you can't, although that's up to you.)
Upvotes: 2