def read_with_lock(self, pos, _len=None):
        """
        Reads {_len} characters if _len is not None else reads line
        :param pos: start reading position
        :param _len: number of characters to read
        :rtype: (string, int)
        """
        self.wait_lock()
        try:
            self._opened_file.seek(pos)
            result = self._opened_file.read(_len) if _len is not None else self._opened_file.readline()
            stop_pos = self._opened_file.tell()
        finally:
            self.unlock()
        if not result and self.stop.is_set():
            result = None
        return result, stop_pos
def read_with_lock(self, pos, _len=None):
        """
        Reads {_len} characters if _len is not None else reads line
        :param pos: start reading position
        :param _len: number of characters to read
        :rtype: (string, int)
        """
        self.wait_lock()
        try:
            self._opened_file.seek(pos)
            result = self._opened_file.read(_len) if _len is not None else self._opened_file.readline()
            stop_pos = self._opened_file.tell()
        finally:
            self.unlock()
        if not result and self.stop.is_set():
            result = None
        return result, stop_pos
def read_with_lock ( self , pos , _len = None ) : self . wait_lock ( ) try : self . _opened_file . seek ( pos ) result = self . _opened_file . read ( _len ) if _len is not None else self . _opened_file . readline ( ) stop_pos = self . _opened_file . tell ( ) finally : self . unlock ( ) if not result and self . stop . is_set ( ) : result = None return result , stop_pos
Reads {_len} characters if _len is not None else reads line
        :param pos: start reading position
        :param _len: number of characters to read
        :rtype: (string, int)
Reads { _len } characters if _len is not None else reads line : param pos : start reading position : param _len : number of characters to read : rtype : ( string int )