'Return the contents of the current X selection.
A keyword parameter selection specifies the name of
the selection and defaults to PRIMARY.  A keyword
parameter displayof specifies a widget on the display
to use. A keyword parameter type specifies the form of data to be
fetched, defaulting to STRING except on X11, where UTF8_STRING is tried
before STRING.'

def selection_get(self, **kw):

    if ('displayof' not in kw):
        kw['displayof'] = self._w
    if (('type' not in kw) and (self._windowingsystem == 'x11')):
        try:
            kw['type'] = 'UTF8_STRING'
            return self.tk.call((('selection', 'get') + self._options(kw)))
        except TclError:
            del kw['type']
    return self.tk.call((('selection', 'get') + self._options(kw)))
