Re: Searching for patterns on the screen

2006-09-15 Thread Paul McGuire
"John Machin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Paul McGuire wrote: >> "Jerry Hill" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> > Hello all, >> As far as working just in Python, you could remove the tuple unpacking >> inside removeColor, and shor

Re: Searching for patterns on the screen

2006-09-15 Thread Filip Wasilewski
Jerry Hill wrote: > Hello all, > > I have a piece of code I could use some help optimizing. What I'm > attempting to do is periodically grab a screenshot, and search for 2D > patterns of black pixels in it. I don't care about any color other > than black. Here's some simple code that simulates m

Re: Searching for patterns on the screen

2006-09-15 Thread Claudio Grondi
Jerry Hill wrote: > Hello all, > > I have a piece of code I could use some help optimizing. What I'm > attempting to do is periodically grab a screenshot, and search for 2D > patterns of black pixels in it. I don't care about any color other > than black. Here's some simple code that simulates

Re: Searching for patterns on the screen

2006-09-15 Thread Jerry Hill
On 15 Sep 2006 08:16:41 -0700, John Machin <[EMAIL PROTECTED]> wrote: > C:\junk>python -mtimeit -s"BLACK=(0,0,0);rgb=(1,1,1)" "rgb==BLACK" > 100 loops, best of 3: 0.129 usec per loop > > C:\junk>python -mtimeit -s"rgb=(1,1,1)" "rgb==(0,0,0)" > 100 loops, best of 3: 0.127 usec per loop Surp

Re: Searching for patterns on the screen

2006-09-15 Thread John Machin
Paul McGuire wrote: > "Jerry Hill" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hello all, > > > > I have a piece of code I could use some help optimizing. What I'm > > attempting to do is periodically grab a screenshot, and search for 2D > > patterns of black pixels in it.

Re: Searching for patterns on the screen

2006-09-15 Thread Paul McGuire
"Jerry Hill" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello all, > > I have a piece of code I could use some help optimizing. What I'm > attempting to do is periodically grab a screenshot, and search for 2D > patterns of black pixels in it. I don't care about any color other