def OpenOutput(path, mode='w'):
  """Open |path| for writing, creating directories if necessary."""
  try:
    os.makedirs(os.path.dirname(path))
  except __HOLE__:
    pass
  return open(path, mode)
dataset/ETHPy150Open adobe/brackets-shell/gyp/pylib/gyp/generator/ninja.py/OpenOutput