jpeg files displayed in a loop
fperez528 at yahoo.com
Mon Dec 10 15:24:33 CET 2001
Kevin Cazabon wrote:
> # ok, probably a couple minor typos, but it should be that simple.
Well, you got me curious. Here is the code with some things corrected. This
actually runs, but it hangs at the first image. My cpu usage pegged at 100%
and I just had to kill the job, it wasn't going anywhere. Any ideas?
import Image, ImageTk
dir = "/usr/local/home/fperez/local/python/jpegs"
image = files.pop()
image = ImageTk.PhotoImage(Image.open(image)) #ok, do try/except
a = Tkinter.Tk()
b = Tkinter.Label(a)
files = os.listdir(dir) # ok, check them for file types...
More information about the Python-list