python - Please suggest how to write a text from webpage text box to clipboard -


i have text box in webpage, text in text box need sent clipboard of ubuntu how do that? i'm using python cgi, please suggest me link or idea proceed.

thank :)

python , cgi run on server, want copy text webpage client viewing client's clipboard.

hence have solution client-side javascript or javascript library jquery. used do-able using jquery clipboard, though security problem rogue flash apps arbitrarily alter users clipboard (causing people paste wrong url, etc). so, flash fixed security hole allowed client scripts alter clipboard whenever script wanted, date versions of flash can't alter clipboard unless user initiating action click inside flash movie.

however, http://code.google.com/p/zeroclipboard/ still works (requiring click button before can modify clipboard), can use that. have test pages , wiki of instructions


getting text ubuntu (assuming gnome desktop environment) clipboard python script can done with

import  pygtk import gtk clipboard = gtk.clipboard_get() print clipboard.wait_for_text() 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -