Package lib :: Module scripting :: Class GtkClipboard
[hide private]
[frames] | no frames]

Class GtkClipboard

source code

Read/write access to the X selection and clipboard - GTK version

Instance Methods [hide private]
 
__init__(self, app) source code
 
fill_selection(self, contents)
Copy text into the X selection
source code
 
__fillSelection(self, string) source code
str
get_selection(self)
Read text from the X selection
source code
 
__receive(self, cb, text, data=None) source code
 
fill_clipboard(self, contents)
Copy text into the clipboard
source code
 
__fillClipboard(self, string) source code
str
get_clipboard(self)
Read text from the clipboard
source code
 
__execAsync(self, callback, *args) source code
Method Details [hide private]

fill_selection(self, contents)

source code 

Copy text into the X selection

Usage: clipboard.fill_selection(contents)

Parameters:
  • contents - string to be placed in the selection

get_selection(self)

source code 

Read text from the X selection

Usage: clipboard.get_selection()

Returns: str
text contents of the mouse selection
Raises:
  • Exception - if no text was found in the selection

fill_clipboard(self, contents)

source code 

Copy text into the clipboard

Usage: clipboard.fill_clipboard(contents)

Parameters:
  • contents - string to be placed in the selection

get_clipboard(self)

source code 

Read text from the clipboard

Usage: clipboard.get_clipboard()

Returns: str
text contents of the clipboard
Raises:
  • Exception - if no text was found on the clipboard