<html><div style='background-color:'><DIV class=RTE>
<P>thank you .you can stop sending me&nbsp;these now thanks<BR><BR></P></DIV>
<DIV></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #a0c6e5 2px solid; MARGIN-RIGHT: 0px"><FONT style="FONT-SIZE: 11px; FONT-FAMILY: tahoma,sans-serif">
<HR color=#a0c6e5 SIZE=1>

<DIV></DIV>From:&nbsp;&nbsp;<I>tutor-request@python.org</I><BR>Reply-To:&nbsp;&nbsp;<I>tutor@python.org</I><BR>To:&nbsp;&nbsp;<I>tutor@python.org</I><BR>Subject:&nbsp;&nbsp;<I>Tutor Digest, Vol 33, Issue 12</I><BR>Date:&nbsp;&nbsp;<I>Fri, 03 Nov 2006 12:00:11 +0100</I><BR>&gt;Send Tutor mailing list submissions to<BR>&gt; tutor@python.org<BR>&gt;<BR>&gt;To subscribe or unsubscribe via the World Wide Web, visit<BR>&gt; http://mail.python.org/mailman/listinfo/tutor<BR>&gt;or, via email, send a message with subject or body 'help' to<BR>&gt; tutor-request@python.org<BR>&gt;<BR>&gt;You can reach the person managing the list at<BR>&gt; tutor-owner@python.org<BR>&gt;<BR>&gt;When replying, please edit your Subject line so it is more specific<BR>&gt;than "Re: Contents of Tutor digest..."<BR>&gt;<BR>&gt;<BR>&gt;Today's Topics:<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;1. Re: Print Screen (Chris 
Hengge)<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;2. Re: Print Screen (Luke Paireepinart)<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;3. Checking the format of IP address... (Asrarahmed Kadri)<BR>&gt;<BR>&gt;<BR>&gt;----------------------------------------------------------------------<BR>&gt;<BR>&gt;Message: 1<BR>&gt;Date: Fri, 3 Nov 2006 00:08:19 -0800<BR>&gt;From: "Chris Hengge" &lt;pyro9219@gmail.com&gt;<BR>&gt;Subject: Re: [Tutor] Print Screen<BR>&gt;To: "Luke Paireepinart" &lt;rabidpoobear@gmail.com&gt;<BR>&gt;Cc: pythontutor &lt;tutor@python.org&gt;<BR>&gt;Message-ID:<BR>&gt; &lt;c25107380611030008r1e446bccr190412c7ed844f8d@mail.gmail.com&gt;<BR>&gt;Content-Type: text/plain; charset="iso-8859-1"<BR>&gt;<BR>&gt;Wow.. I have visions of writing a little wanna-be VNC client/server now<BR>&gt;using the ImageGrab.grab() =D<BR>&gt;This ImageGrab trick does exactly what I wanted. Thanks for the 
tip!<BR>&gt;<BR>&gt;Actually, I want to write a little package for the learning experience<BR>&gt;sometime over the holidays (plus I use VNC fairly often), but I can't find<BR>&gt;any direction, or any already made packages for python for the VNC protocol<BR>&gt;(no libs?).<BR>&gt;<BR>&gt;On 11/2/06, Luke Paireepinart &lt;rabidpoobear@gmail.com&gt; wrote:<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; &gt;&gt; Anyone know of a way to capture special keys like "Print Screen"?<BR>&gt; &gt; &gt;&gt; I have a small script to grab all they keycodes, but it doesn't seem to<BR>&gt; &gt; &gt;&gt; catch several keys on the keyboard. I've got a utility that I'd like to<BR>&gt; &gt; &gt;&gt; be able to automagically get a screenshot when something goes wrong so<BR>&gt; &gt; I<BR>&gt; &gt; &gt;&gt; dont have to hope the user can re-create the error. Universal support<BR>&gt; &gt; &gt;&gt; would be best, but 
WinXP is the main OS<BR>&gt; &gt; &gt;&gt;<BR>&gt; &gt; &gt;&gt;<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; I'm not exactly sure what you want here :-) but if you want to capture<BR>&gt; &gt; &gt; when the 'Print Screen' key (or any other key) has actually been<BR>&gt; &gt; &gt; pressed, try pyHook. Note: pyHook only works on Windows!<BR>&gt; &gt; &gt;<BR>&gt; &gt; Also note that if you want all of the keypresses, but you _don't_ care<BR>&gt; &gt; about the application with focus<BR>&gt; &gt; receiving the input, you can do a complete key grab using TKInter or<BR>&gt; &gt; Pygame, and probably the other GUI packages too.<BR>&gt; &gt; But, like I said, if you were, for example, typing an e-mail and you<BR>&gt; &gt; started a script that did a complete grab like this, you'd no longer be<BR>&gt; &gt; able to type<BR>&gt; &gt; into the e-mail window.&nbsp;&nbsp;Using pyHook, your program could see 
all the<BR>&gt; &gt; keypresses, but they'd also still be sent to the e-mail program.<BR>&gt; &gt; Actually, I've never tried it, but I'm pretty sure that's how the GUI<BR>&gt; &gt; packages' key capturing works.<BR>&gt; &gt; You may be asking 'well, it sounds like pyHook does a better job of this<BR>&gt; &gt; anyway!'<BR>&gt; &gt; Yeah, you're right.<BR>&gt; &gt; However, as Alan exclaimed, pyHook works only on Windows!<BR>&gt; &gt; So the solution I offered would be more portable.<BR>&gt; &gt; Hope that helps,<BR>&gt; &gt; -Luke<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt;-------------- next part --------------<BR>&gt;An HTML attachment was scrubbed...<BR>&gt;URL: http://mail.python.org/pipermail/tutor/attachments/20061103/7f2cbe57/attachment-0001.htm<BR>&gt;<BR>&gt;------------------------------<BR>&gt;<BR>&gt;Message: 2<BR>&gt;Date: Fri, 03 Nov 2006 02:35:41 -0600<BR>&gt;From: Luke Paireepinart 
&lt;rabidpoobear@gmail.com&gt;<BR>&gt;Subject: Re: [Tutor] Print Screen<BR>&gt;To: Chris Hengge &lt;pyro9219@gmail.com&gt;<BR>&gt;Cc: pythontutor &lt;tutor@python.org&gt;<BR>&gt;Message-ID: &lt;454AFF5D.4050000@gmail.com&gt;<BR>&gt;Content-Type: text/plain; charset=ISO-8859-1; format=flowed<BR>&gt;<BR>&gt;Chris Hengge wrote:<BR>&gt; &gt; Wow.. I have visions of writing a little wanna-be VNC client/server<BR>&gt; &gt; now using the ImageGrab.grab() =D<BR>&gt; &gt; This ImageGrab trick does exactly what I wanted. Thanks for the tip!<BR>&gt; &gt;<BR>&gt; &gt; Actually, I want to write a little package for the learning experience<BR>&gt; &gt; sometime over the holidays (plus I use VNC fairly often), but I can't<BR>&gt; &gt; find any direction, or any already made packages for python for the<BR>&gt; &gt; VNC protocol (no libs?).<BR>&gt;Heh, I was actually writing my own VNC, that's when I ran 
into the<BR>&gt;ImageGrab function.<BR>&gt;I also did something cool, which is :<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.prevscr = self.currscr<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.currscr = ImageGrab.grab().resize((800,600))<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; diff = ImageChops.difference(self.prevscr,self.currscr)<BR>&gt;<BR>&gt;Obviously you need a currscr before you start, which I declared during<BR>&gt;the initialization of the class.<BR>&gt;The cool part of this is that the ImageChops difference will return<BR>&gt;black pixels in any area of the screen that hasn't changed.<BR>&gt;so you can just send the changed parts over the network (if you have a<BR>&gt;good algorithm to discard the unchanged portions).<BR>&gt;Would be much faster than sending the whole screen every frame, obviously.<BR>&gt;Not CPU-faster, 
but network-faster.<BR>&gt;<BR>&gt;<BR>&gt;------------------------------<BR>&gt;<BR>&gt;Message: 3<BR>&gt;Date: Fri, 3 Nov 2006 10:51:14 +0000<BR>&gt;From: "Asrarahmed Kadri" &lt;ajkadri@googlemail.com&gt;<BR>&gt;Subject: [Tutor] Checking the format of IP address...<BR>&gt;To: pythontutor &lt;tutor@python.org&gt;<BR>&gt;Message-ID:<BR>&gt; &lt;b4e894c70611030251h278becb2n166c439ac335f65b@mail.gmail.com&gt;<BR>&gt;Content-Type: text/plain; charset="iso-8859-1"<BR>&gt;<BR>&gt;Hi Folks,<BR>&gt;<BR>&gt;I want to implement a simple program that verifies the IP provided by the<BR>&gt;user is in the right format or not.<BR>&gt;<BR>&gt;How to go about it..?<BR>&gt;Any suggestions..<BR>&gt;<BR>&gt;TIA.<BR>&gt;Regards,<BR>&gt;Asrarahmed<BR>&gt;<BR>&gt;<BR>&gt;--<BR>&gt;To HIM you shall return.<BR>&gt;-------------- next part --------------<BR>&gt;An HTML attachment was scrubbed...<BR>&gt;URL: 
http://mail.python.org/pipermail/tutor/attachments/20061103/1718a735/attachment.html<BR>&gt;<BR>&gt;------------------------------<BR>&gt;<BR>&gt;_______________________________________________<BR>&gt;Tutor maillist&nbsp;&nbsp;-&nbsp;&nbsp;Tutor@python.org<BR>&gt;http://mail.python.org/mailman/listinfo/tutor<BR>&gt;<BR>&gt;<BR>&gt;End of Tutor Digest, Vol 33, Issue 12<BR>&gt;*************************************<BR></FONT></BLOCKQUOTE></div><br clear=all><hr>Be the first to hear what's new at MSN -  <a href="http://g.msn.com/8HMBENUK/2740??PS=47575" target="_top">sign up to our free newsletters!</a> </html>