Re: how to switch image in tkinter? making it mutable? how?

2010-08-16 Thread ChrisChia
On Aug 17, 2:57 am, Jeff Hobbs wrote: > On Aug 16, 7:30 am, ChrisChia wrote: > > > I have this: > > image1 = ImageTk.PhotoImage(file = "c:\\f1.jpg") > > image2 = ImageTk.PhotoImage(file = "c:\\f2.jpg") > > > imagelist.append(image1) >

how to switch image in tkinter? making it mutable? how?

2010-08-16 Thread ChrisChia
I have this: image1 = ImageTk.PhotoImage(file = "c:\\f1.jpg") image2 = ImageTk.PhotoImage(file = "c:\\f2.jpg") imagelist.append(image1) imagelist.append(image2) self.label = tk.Label(image = imagelist[0]) is there a way that i can create a method to switch the display the image2 (imagelist 2nd

Re: 2 threads; 1 more Tkinter and 1 more terminal. problem

2010-08-15 Thread ChrisChia
On Aug 16, 4:17 am, Terry Reedy wrote: > On 8/15/2010 10:22 AM, ChrisChia wrote: > > > Hi all, > > i am trying to do a GUI with Tkinter package, but i am stuck no matter > > what... > > The problem right now is that my GUI has a label= 'A' (where 'A

2 threads; 1 more Tkinter and 1 more terminal. problem

2010-08-15 Thread ChrisChia
Hi all, i am trying to do a GUI with Tkinter package, but i am stuck no matter what... The problem right now is that my GUI has a label= 'A' (where 'A' is the text on display) i wish to run a program with 2 threads... one for my GUI and the other for the terminal where the terminal will keep liste

Simple Problem but tough for me if i want it in linear time

2010-08-15 Thread ChrisChia
dataList = [a, b, c, ...] where a, b, c are objects of a Class X. In Class X, it contains self.name and self.number If i wish to test whether a number (let's say 100) appears in one of the object, and return that object, is that only fast way of solving this problem without iterating through every

Python Tkinter Simple Qn

2010-08-11 Thread ChrisChia
Hi i have the following problem with Python Tkinter. I switch to switch the image background (which i used Tkinter.Label with image arg to display on the GUI). How can I do that? the callback function which i have created doesn't seem to work... some advice? below is my code: import Tkinter as