def make_tempfile(content=None):
    fd, tmpfile = tempfile.mkstemp()

    if content:
        os.write(fd, content)

    os.close(fd)
    tempfiles.append(tmpfile)
    return tmpfile
Creates a temporary file and returns the path.
dataset/ETHPy150Open reviewboard/rbtools/rbtools/utils/filesystem.py/make_tempfile