views:

73

answers:

1

This isn't a HTML parsing Question. This is about taking a look at pixels on the screen itself.

How would I, with python, look at all the pixels in a programs window.

Following advice, I am narrowing my OS field to win32. If a X-Platform solution exists, this is the place.

+1  A: 

From that answer, I find the approach using PyQt most promising:

import sys
from PyQt4.QtGui import QPixmap, QApplication
app = QApplication(sys.argv)
QPixmap.grabWindow(QApplication.desktop().winId()).save('test.png', 'png')

Now you're just left with a "little" task of actually comprehending what's going on in that picture. Welcome to the amazing world of image processing. In python PIL may help you.

Eli Bendersky