def escapePath(self, path):
        """
        Returns a FTP escaped path (replace newlines with nulls).
        """
        # Escape newline characters
        return path.replace('\n', '\0')

        Returns a FTP escaped path (replace newlines with nulls).
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/ftp.py