I'm not able to load the enums package in python 2.7
from win32com.client import Enums
This is the error message
Traceback (most recent call last): File "", line 1, in ImportError: cannot import name Enums
Please suggest me how to solve this?
I'm going to go out on a limb and say you were using an older version of ControlDesk and are trying to port your scripts to the ControlDesk 5.3 Python27 install.
You have to replace
from win32com.client import Enums
with
from dspace.com import Enums
The dspace module comes with the python27 installed during the ControlDesk install.
dSPACE developers knew very little about python design or best programming practices in general and so when they wrote their library they actually MODIFIED THE CORE LIBRARIES with their own functions. This is of course unbelievably bad practice and will cause horrible backwards compatibility issues, which it has.
Maybe they have since gotten enough hate mail over this that they fixed it or maybe they hired competent python devs, but they moved all their dspace specific tools to the dspace module under the dSPACE common files directory in the site packages folder. They conveniently did not offer any tools to help with the conversion, but at least they did offer this pdf to help with the conversion.
http://www.dspace.com/files/pdf1/Python27MigrationDocument.pdf