All pastes #2082378 Raw Edit

marcus

public python v1 · immutable
#2082378 ·published 2011-09-24 03:14 UTC
rendered paste body
def get_pixel_colour(i_x, i_y):	import gtk # python-gtk2	o_gdk_pixbuf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, 1, 1)	o_gdk_pixbuf.get_from_drawable(gtk.gdk.get_default_root_window(), gtk.gdk.colormap_get_system(), i_x, i_y, 0, 0, 1, 1)	return tuple(o_gdk_pixbuf.get_pixels_array().tolist()[0][0])color = Nonewhile 1:        new = get_pixel_colour(189, 98) #<--- CHANGE THAT	if color != new:		print "\a\a\a"        color = new