John Finlay wrote:
mc collilieux wrote:

Hello, I try to run the example program of clipboard but it does not work with me :-(


It's broken. Specifically the clipboard_text_received() method is broken. Try the attached instead.

    def clipboard_text_received(self, clipboard, text, data):
        if not text or text == '':
            return
        cbi = ClipboardInfo()
        cbi.text = text
        # prepend and remove duplicate
        self.clipboard_history = ([cbi]
                                  + [info for info in self.clipboard_history
                                     if info and info.text<>text])[:10]
        self.clipboard.request_targets(self.clipboard_targets_received, cbi)
        return



It works better, thanks.

I had tried but not succeeded in transforming the contents of self.clipboard_history.
Now with more training...

And thanks for all the tutorial !
--
Marie-Claude Collilieux
Bretagne
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to