def _FingerprintFile(filename):
  if not (os.path.exists(filename) and os.path.isfile(filename)):
    return None

  f = open(filename)

  fp = compat.sha1_hash()
  while True:
    data = f.read(4096)
    if not data:
      break

    fp.update(data)

  return fp.hexdigest()
Handles an STC request for styling for some area.
dataset/ETHPy150Open ganeti/ganeti/lib/utils/hash.py/_FingerprintFile--crossover with--dataset/ETHPy150Open enthought/traitsui/traitsui/wx/code_editor.py/SourceEditor._style_needed