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>
&nbsp;&nbsp;&nbsp; pic = 0<br>
print &quot;There are %s saved images in the image folder.&quot; % len(pics)<br>
<br>
def newPic():<br>
&nbsp;&nbsp;&nbsp; Data.pic += 1<br>
<br>
def quitProg():<br>
&nbsp;&nbsp;&nbsp; raise SystemExit<br>
<br>
def Dsp_Image():<br>
&nbsp;&nbsp;&nbsp; root = Tk()<br>
&nbsp;&nbsp;&nbsp; root.title(&quot;GaCoR Image Browser&quot;)<br>
&nbsp;&nbsp;&nbsp; app = Frame(root)<br>
&nbsp;&nbsp;&nbsp; app.grid()<br>
&nbsp;&nbsp;&nbsp; img = Image.open('%s%s' % (imgDir, pics[Data.pic]))<br>
&nbsp;&nbsp;&nbsp; imgPrep = ImageTk.PhotoImage(img)<br>
&nbsp;&nbsp;&nbsp; imgShow = Label(app, image=imgPrep).grid()<br>
&nbsp;&nbsp;&nbsp; info = Label(app, text=&quot;Displaying %s&quot; % pics[Data.pic]).grid()<br>
&nbsp;&nbsp;&nbsp; next = Button(app, text=&quot;Next Image&quot;, command=newPic).grid()<br>
&nbsp;&nbsp;&nbsp; close = Button(app, text=&quot;Close&quot;, command=quitProg).grid()<br>
&nbsp;&nbsp;&nbsp; print Data.pic<br>
&nbsp;&nbsp;&nbsp; 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>