A cross platform clipboard that makes it easy and transparent to access and interact with the native clipboard
Currently supported clipboards:
- Windows
- Linux Gtk
- Linux Qt
import clipton
clipboard = clipon.get_clipboard()
import clipton
clipboard = clipon.get_clipboard()
clipboard.copy("hello clipton!") # default expects unicode text
clipboard.copy("<html><body><p>texto html</p></body></html>", clipboard.HTML) # specifying the data format (html)
import clipton
clipboard = clipon.get_clipboard()
clipboard.formats()
>> [(13, 'unicodetext'),
>> (16, 'locale'),
>> (1, 'text'),
>> (7, 'oemtext')]
import clipton
clipboard = clipon.get_clipboard()
clipboard.text()
>> u"hello clipton!"
import clipton
clipboard = clipon.get_clipboard()
clipboard.paste(clipboard.TEXT) # unicode
>> u"hello clipton!"
import clipton
clipboard = clipon.get_clipboard()
clipboard.contents()
>> {'locale': '\n,',
>> 'oemtext': 'hello clipton!',
>> 'text': 'hello clipton!',
>> 'unicodetext': u'hello clipton!'}