Hi,<br>
I've written an image reader that uses the PIL module.<br>
I have a variable that uses os.listdir('mydir') to make a list of all
the pictures in the folder... here's what I'm talking about:<br>
<br>
pics = os.listdir(imgDir)<br>
pics.remove('license.txt')<br>
pics.remove('gacor.py')<br>
class Data:<br>
pic = 0<br>
print "There are %s saved images in the image folder." % len(pics)<br>
<br>
def newPic():<br>
Data.pic += 1<br>
<br>
def quitProg():<br>
raise SystemExit<br>
<br>
def Dsp_Image():<br>
root = Tk()<br>
root.title("GaCoR Image Browser")<br>
app = Frame(root)<br>
app.grid()<br>
img = Image.open('%s%s' % (imgDir, pics[Data.pic]))<br>
imgPrep = ImageTk.PhotoImage(img)<br>
imgShow = Label(app, image=imgPrep).grid()<br>
info = Label(app, text="Displaying %s" % pics[Data.pic]).grid()<br>
next = Button(app, text="Next Image", command=newPic).grid()<br>
close = Button(app, text="Close", command=quitProg).grid()<br>
print Data.pic<br>
app.mainloop()<br>
<br>
<br>
Dsp_Image()<br>
<br>
<br>
The image won't refresh when I click on 'Next'! Any help would be appreciated.<br>
Joe<br>