def _ToLocalPath(toplevel_dir, path):
  if path == toplevel_dir:
    return ''
  if path.startswith(toplevel_dir + '/'):
    return path[len(toplevel_dir) + len('/'):]
  return path
Converts |path| to a path relative to |toplevel_dir|.
dataset/ETHPy150Open pyokagan/gyp/pylib/gyp/generator/analyzer.py/_ToLocalPath