tksteal & tkinter
Mike Clarkson
support at internetdiscovery.com
Fri Nov 1 15:16:36 EST 2002
On Wed, 30 Oct 2002 15:17:06 +0000, Robin Becker
<robin at jessikat.fsnet.co.uk> wrote:
>A questioner on the PMW list asks if there's a way to capture windows
>and there used to be for Tk an X11 extension called TkSteal. So far as I
>remember that was a C extension and is probably still workable (even if
>not supported). Supposing that one could build and test the thing in
>Tcl/Tk how does one use from tkinter or do the extension commands become
>known to tkinter when the extension is loaded?
Robin,
I have an "updated" version of TkSteal for 8.3.3 I can send you.
It was a bare minimum patch to get it working for 8.3.3 and
I'm not usiig it a whole lot so there may be some small tinkering to
do.
Any shared C Tk extension loads easily into Tkinter these days (2.1)
with a
root.tk.eval('package require Ext')
assuming you have installed it into the Tcl/ subdirectory of Python.
You may need to fiddle with the pkgIndex.tcl a little.
Any Tk extension, as the very least can be called from Python
root.tk.eval('Ext foo bar')
Writing a wrapper is straight forward and is basically pattern
matching on the Tkinter.py code.
I have taken up a collection for a home for wayward Tk wrappers into
Python in the Python/ directory of Tixapps -
http://tix.sourceforge.net/Tixapps/
If someone does a wrapper for TkSteal I'll add it to the collection.
Mike.
More information about the Python-list
mailing list