Re: 2.7.9: PhotoImage get/put

2015-10-21 Thread Randy Day
In article , tjre...@udel.edu says... [snip] > > I made my 'root' Tk instance global, and > > call root.update_idletasks() after the > > .put > I did not see the original post, but the alternative way to animate is > to use root.after(milliseconds, callback, *args) at the end of callbacks > t

Re: 2.7.9: PhotoImage get/put

2015-10-21 Thread Terry Reedy
On 10/21/2015 1:50 AM, Randy Day wrote: When I read your post, I realized I'm doing a crude animation. After a bit of searching on 'python canvas animation', I found a reference to how it's done: I made my 'root' Tk instance global, and call root.update_idletasks() after the .put I did not se

Re: 2.7.9: PhotoImage get/put

2015-10-20 Thread Randy Day
In article , em...@fenx.com says... [snip] > I have no idea why, but here are some ideas I'd try out. > So is it refreshing upon completion of the loop, or upon exit from > process()? It turns out I need to call root.update_idletasks() for my root Tk object to get it to refresh after I put t

Re: 2.7.9: PhotoImage get/put

2015-10-20 Thread Randy Day
In article , illusiontechniq...@gmail.com says... [snip] > If you want to pass arguments to a command called when a button is > clicked, you have to use 'lambda' in tkinter. Thanks. I just skimmed over lambda before now... > You can't expect a delay to happen during the mainloop() of the > pr

Re: 2.7.9: PhotoImage get/put

2015-10-20 Thread C Smith
>> def process(): # Ordinarily this would be process(photo,wdth,hgt) >>global wdth # but I ran into problems calling it from a button If you want to pass arguments to a command called when a button is clicked, you have to use 'lambda' in tkinter. >>global hgt #command with parameters... >

Re: 2.7.9: PhotoImage get/put

2015-10-20 Thread Emile van Sebille
On 10/20/2015 3:05 PM, Randy Day wrote: I'm writing a simple image manipulation on a PhotoImage (tkinter), and running into an odd problem. The code below works, except for one thing: As the image is scanned, I'd like to observe the pixels getting inverted on the image (as a kind of progress bar

2.7.9: PhotoImage get/put

2015-10-20 Thread Randy Day
I'm writing a simple image manipulation on a PhotoImage (tkinter), and running into an odd problem. The code below works, except for one thing: As the image is scanned, I'd like to observe the pixels getting inverted on the image (as a kind of progress bar). What happens is that the code run