[Tutor] Cackling with Maniac Laughter (was: starting a tkinter window maximized)

Michael P. Reilly arcege@speakeasy.net
Thu, 3 May 2001 17:31:10 -0400 (EDT)


kromag@nsacom.net wrote

[snipped]
> Good heavens yes it is rude. Unfortunately I am stuck with Win9x for this 
> particular experiment! :-) 
> 
> What I am trying to do is pop up a window as a screen saverish app that 
> displays information rather than a cute bouncing whatsis. I 'compiled' the 
> program with py2exe (a wonderful program!) then switched it's extention 
> to .scr. Walla! A badly-behaved screensaver! 
> 
> I cackled with Maniac Laughter as as my little script popped up after 60 
> seconds! :-)
> 
> Now all I have to do is come up with code that will only allow one instance 
> of the program to run at a time (I know I saw something to the effect in one 
> of my Python books, so no one answer this till I give up! ;-)
> 
> Of the five parts of the windows screensaver API, I need:
> 
> 1. provide a description of itself 
> 2. distinguish between active mode and configuration mode 
> 3. disallow multiple copies of itself to run 
> 
> I just got "Python Programming for Win32", so I hope the answers lie therin. 
> (If I can keep from playing with the cool accounting examples he is starting 
> us out with. I never thought that stuff would be this interesting....)

You might also want to get rid of the window manager's decorations with
wm_transient() and making it on top (focus_set, grab_set_global, tkraise).
Just provide a way of making a way of stopping it (moving mouse, key
press, etc.).

  -Arcege

-- 
+----------------------------------+-----------------------------------+
| Michael P. Reilly                | arcege@speakeasy.net              |