code: def get_clipboard(self):
          
  
          bmpdata = wx.BitmapDataObject()
          textdata = wx.TextDataObject()
  
          if self.clipboard.Open():
              is_bmp_present = self.clipboard.GetData(bmpdata)
              self.clipboard.GetData(textdata)
              self.clipboard.Close()
          else:
              wx.MessageBox(_("Can't open the clipboard"), _("Error"))
  
          if is_bmp_present:
              return bmpdata.GetBitmap()
          else:
              return textdata.GetText()
docs: Returns the clipboard content
  
          If a bitmap is contained then it is returned.
          Otherwise, the clipboard text is returned.