def safe_open(filename, *args, **kwargs):
  safe_mkdir(os.path.dirname(filename))
  return open(filename, *args, **kwargs)  # noqa: T802
Safely open a file.
dataset/ETHPy150Open pantsbuild/pex/pex/common.py/safe_open