(path, mode='w')
return open(path, mode)
Open |path| for writing, creating directories if necessary.
Open |path| for writing, creating directories if necessary.
Open |path| for writing creating directories if necessary .
def OpenOutput(path, mode='w'):
  """Open |path| for writing, creating directories if necessary."""
  try:
    os.makedirs(os.path.dirname(path))
  except OSError:
    pass
  return open(path, mode)
def OpenOutput ( path , mode = 'w' ) : try : os . makedirs ( os . path . dirname ( path ) ) except OSError : pass return open ( path , mode )