On 2011-10-04, Ian Kelly wrote: > On Tue, Oct 4, 2011 at 3:56 AM, Adam Funk <a24...@ducksburg.com> wrote: >> I'd like to create a window with a "pause" button and a large plotting >> area, in which I'd like to draw a polygon, detect the pixel >> coördinates of a mouse click, and then start setting the colors of >> pixels by (x,y) coördinates. (This is just for my own amusement, to >> play with some formulas for generating fractals using random numbers.) >> >> There seems to be a large number of different python GUI libraries, >> and I wonder if someone can recommend the easiests one to learn for >> this purpose? (The only python graphics library I've used is PyGame, >> which I don't think is the way to go here.) > > You could use wxPython. You'll need to create a custom control and > have it paint itself by blitting from a wx.Bitmap, which you'll draw > on by using a wx.MemoryDC and then refreshing the control. > > I would probably just use pygame myself. I guess you're avoiding it > because of the requirement for a button, but there are GUI libraries > available for it, or if all you need are a couple of buttons you could > easily roll your own.
Excellent suggestion. I got it to work, but using keypresses (pause, step, quit) instead of buttons, and a mouse event for letting the user pick the start point on the screen. -- I worry that 10 or 15 years from now, [my daughter] will come to me and say 'Daddy, where were you when they took freedom of the press away from the Internet?' [Mike Godwin] http://www.eff.org/ -- http://mail.python.org/mailman/listinfo/python-list