Accessing clipboard through software built on Python

Tim Daneliuk info at tundraware.com
Sun Oct 28 15:58:03 EDT 2018


On 10/28/2018 02:08 PM, Akkana Peck wrote:
> 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
>
Yes, that sounds right in the distant recesses of my memory :)


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /