code: 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)
docs: Read file from disk.