code: 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)
docs: Ends the whole document. This should be called the last