(self)
copy as plain ascii/hex
copy as plain ascii/hex
copy as plain ascii / hex
def on_cm_copy(self):
        """ copy as plain ascii/hex
        """
        start = self.selection.start
        end = self.selection.end

        if start == end:
            return

        if self.caret.mode == 'ascii':
            data = self.data[start:end]
            pyperclip.copy(self.to_ascii(data))
        else:
            data = self.data[start:end]
            data_str = "".join(['{:02x} '.format(x) for x in data])
            pyperclip.copy(data_str)
def on_cm_copy ( self ) : start = self . selection . start end = self . selection . end if start == end : return if self . caret . mode == 'ascii' : data = self . data [ start : end ] pyperclip . copy ( self . to_ascii ( data ) ) else : data = self . data [ start : end ] data_str = "" . join ( [ '{:02x} ' . format ( x ) for x in data ] ) pyperclip . copy ( data_str )