(no subject)

Jeff Epler jepler at unpythonic.net
Tue Sep 16 08:00:24 EDT 2003


It is possible on the Tk end on X11.  Here's how you do it:

    from Tkinter import *
    import os

    t = Tk()
    f = Frame(t, container=1, width=300, height=300)
    f.pack()
    frame_id = f.winfo_id()

    os.system("/usr/X11R6/lib/xscreensaver/gears -window-id 0x%x &" % frame_id)

    t.mainloop()
The idea is this: You create a frame with -container and the desired
size for your app.  Then, you create the other app but tell it to use
the specific window-id as parent, instead of the root window.  Your task
is to figure out how to specify the equivalent of xscreensaver's
-window-id or Tk's Toplevel(use=) with PyGame.

If you're using Windows, I have no idea how or if this works.

Jeff





More information about the Python-list mailing list