

def make_tempfile(content=None):
    'Creates a temporary file and returns the path.\n\n    The path is stored in an array for later cleanup.\n    '
    (fd, tmpfile) = tempfile.mkstemp()
    if content:
        os.write(fd, content)
    os.close(fd)
    tempfiles.append(tmpfile)
    return tmpfile

dataset/ETHPy150Open reviewboard/rbtools/rbtools/utils/filesystem.py make_tempfile/original