pyclip xclip_clip module¶
Provides the clipboard functionality for Linux via xclip
-
class
pyclip.xclip_clip.XclipClipboard[source]¶ -
-
copy(data, encoding=None)[source]¶ Copy data into the clipboard
- Parameters
data (
Union[str,bytes]) – the data to be copied to the clipboard. Can be str or bytes.encoding (
Optional[str]) – same meaning as insubprocess.Popen.
- Return type
None- Returns
None
-
paste(encoding=None, text=None, errors=None)[source]¶ Retrieve data from the clipboard
- Parameters
encoding (
Optional[str]) – same meaning as insubprocess.runtext (
Optional[bool]) – same meaning as insubprocess.runerrors (
Optional[str]) – same meaning as insubprocess.run
- Returns
the clipboard contents. return type is binary by default. If any of
encoding,errors, ortextare specified, the result type is str
-