Tim Daneliuk writes:
> However, the highlighted text must be copied explicitly:
> 
> Highlight
> Ctl-C
[ ... ]
> X actually has several clipboard buffers and it can be tricky to get this 
> going.  I don't recall,
> but either clipboard or pyperclip have a way to get to them all IIRC ...

To get the highlighted text in X without needing a copy, you want the
PRIMARY X selection rather than CLIPBOARD.

I think pyperclip can get it (it uses an external program like xsel,
and xsel can get any of the three X selections), or you can get the
selection using a GUI library like GTK, Qt or Tk. Some examples:
https://github.com/akkana/scripts/blob/master/pyclip

        ...Akkana
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to