def __init__(self, filename):

        self._data = None
        self._data_queue = deque()
        self._file = filename
        self._fd = None
        self._timer = None

        try:
            self._open_file()
        except OSError, (errno, errmsg):
            raise errors.InitError("Failed to open nagios pipe %s: %s"
                    % (self._file, errmsg))

        reactor.addSystemEventTrigger('after', 'shutdown', self.shutdown)
Initialize writer with a file descriptor.
dataset/ETHPy150Open marineam/nagcat/python/nagcat/nagios_api.py/NagiosWriter.__init__