This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import threading | |
from contextlib import contextmanager | |
from pymodbus.datastore.store import BaseModbusDataBlock | |
class ContextWrapper(object): | |
''' This is a simple wrapper around enter | |
and exit functions that conforms to the pyhton | |
context manager protocol: |