Bugzilla – Attachment 45714 Details for
Bug 35964
excessive memory usage when many columns are selected in calc
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
A minimal program for fetching the selection clipboard as soon as it changes
selectionbully.py (text/x-python), 676 bytes, created by
ulrik.sverdrup
on 2011-04-16 11:20:33 UTC
(
hide
)
Description:
A minimal program for fetching the selection clipboard as soon as it changes
Filename:
MIME Type:
Creator:
ulrik.sverdrup
Created:
2011-04-16 11:20:33 UTC
Size:
676 bytes
patch
obsolete
>#!/usr/bin/env python > >import sys > >import pygtk >pygtk.require('2.0') >import gtk > >def log(*args): > sys.stderr.write(*map(str, args)) > sys.stderr.write("\n") > >def fetch_selection(clipboard, event): > # gtk text is utf-8... > log("Clipboard owner change, let's get the text") > text = clipboard.wait_for_text() > if text is None: > log("Returned text is None") > else: > log("Fetched %d utf-8 characters of text" % len(text)) > log("Newlines: %d" % text.count("\n")) > >def main(): > log("Will fetch the selection *all the time*") > sel_clip = gtk.clipboard_get(gtk.gdk.SELECTION_PRIMARY) > sel_clip.connect("owner-change", fetch_selection) > gtk.main() > >if __name__ == '__main__': > main()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 35964
:
45239
| 45714