parameters: (self)
docstring: Copy text to clipboard... or keyboard interrupt
docstring_summary: Copy text to clipboard... or keyboard interrupt
docstring_tokens: Copy text to clipboard ... or keyboard interrupt
function: def copy(self):
          """Copy text to clipboard... or keyboard interrupt"""
          if self.hasSelectedText():
              text = self.selectedText()
              text = text.replace('>>> ', '').replace('... ', '').strip()  # removing prompts
              QApplication.clipboard().setText(text)
          else:
              raise KeyboardInterrupt
function_tokens: def copy ( self ) : if self . hasSelectedText ( ) : text = self . selectedText ( ) text = text . replace ( '>>> ' , '' ) . replace ( '... ' , '' ) . strip ( ) # removing prompts QApplication . clipboard ( ) . setText ( text ) else : raise KeyboardInterrupt