'Return the current file position.'

def tell(self):

    with self._lock:
        self._check_not_closed()
        if (self._mode == _MODE_READ):
            return self._buffer.tell()
        return self._pos
