I think it has something to do with the while loop because when I comment it out the rest of the code works fine. The loop itself is running. There is no error, the widget just isn't opening. My code:
from Tkinter import *
from PIL import ImageTk, Image
import time
from os import listdir
from os.path import isfile, join, abspath
root=Tk()
myContainer1 = Frame(root)
myContainer1.pack()
root.attributes("-fullscreen", True)
root.bind("<Escape>", lambda e: e.widget.quit())
mypath = "E:/"
images = [f for f in listdir(mypath) if isfile(join(mypath, f))]
length = len(images)
while True:
for n in range(length):
imgPath = abspath(mypath + images[n])
image = Image.open(imgPath)
photo = ImageTk.PhotoImage(image)
label = Label(image=photo)
label.image = photo
label.pack()
print images[n] #for testing purposes
time.sleep(10)
root.mainloop()