def create_temp_file(self, original_path, content):
    _, ext = os.path.splitext(original_path)
    if ext == ".shtml":
        ext = ".html"
    fd, path = tempfile.mkstemp(suffix=ext)
    try:
        os.write(fd, content)  # This works for Python 2
    except __HOLE__:
        os.write(fd, bytes(content, 'UTF-8'))  # This works for Python 3
    os.close(fd)

    self.temp_files.append(path)
    return path
dataset/ETHPy150Open danvk/ssi-server/ssi_server.py/SSIRequestHandler.create_temp_file