I ask the DaniWeb Community for guidance in resolving the following NameError.
I have attached the import (OpenOPC for Python Library Module), but basically my code:
import OpenOPC
opc = OpenOPC.client()
produces this NameError:
>>> import OpenOPC
>>>
>>> opc = OpenOPC.client()
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
opc = OpenOPC.client()
File "C:\Python27\lib\site-packages\OpenOPC.py", line 152, in __init__
pythoncom.CoInitialize()
NameError: global name 'pythoncom' is not defined
>>>
Please help me eliminate this NameError.