def read(self, location):
        location = os.path.expanduser(location)

        # Try to open this file, using different encodings.
        for e in ENCODINGS:
            try:
                with codecs.open(location, 'r', e) as f:
                    return f.read(), e
            except UnicodeDecodeError:
                pass  # Try next codec.

        # Unable to open.
        raise Exception('Unable to open file: %r' % location)
Read file from disk.
dataset/ETHPy150Open jonathanslenders/pyvim/pyvim/io/backends.py/FileIO.read