code: def write_copy_button(self, text, text_to_copy):
          
          self.write_copy_script = True
          self.write('<button onclick="cp(\'{}\');">{}</button>'
                     .format(text_to_copy, text))
docs: Writes a button with 'text' which can be used
             to copy 'text_to_copy' to clipboard when it's clicked.