def end_body(self):
        """Ends the whole document. This should be called the last"""
        if self.write_copy_script:
            self.write(
                '<textarea id="c" class="invisible"></textarea>'
                '<script>'
                'function cp(t){'
                'var c=document.getElementById("c");'
                'c.value=t;'
                'c.select();'
                'try{document.execCommand("copy")}'
                'catch(e){}}'
                '</script>'
            )

        self.write('</div>{}</body></html>', self._script)
def end_body ( self ) : if self . write_copy_script : self . write ( '<textarea id="c" class="invisible"></textarea>' '<script>' 'function cp(t){' 'var c=document.getElementById("c");' 'c.value=t;' 'c.select();' 'try{document.execCommand("copy")}' 'catch(e){}}' '</script>' ) self . write ( '</div>{}</body></html>' , self . _script )
Ends the whole document. This should be called the last