def writeScript(self, content):
        """
        Write L{content} to a new temporary file, returning the L{FilePath}
        for the new file.
        """
        path = self.mktemp()
        with open(path, "wb") as f:
            f.write(content.encode("ascii"))
        return FilePath(path.encode("utf-8"))

        Write L{content} to a new temporary file, returning the L{FilePath}
        for the new file.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_compat.py