title: Python Tkinter show image acessed on a listbox
body: <p>I'm trying to make a python script that shows a image that is acessed on a listbox. This code that I got on the internet works:</p>
  
  <pre><code>import Tkinter as tk
  from PIL import ImageTk, Image
  
  window = tk.Tk()
  
  path = 'img\\2015722_univ_sqs_sm.jpg'
  img = ImageTk.PhotoImage(Image.open(path))
  panel = tk.Label(window, image = img)
  panel.pack(side = "bottom", fill = "both", expand = "yes")
  
  window.mainloop()
  </code></pre>
  
  <p>But when I tried to adapt it do the listbox it stopped working.</p>
  
  <pre><code>from Tkinter import *
  from PIL import ImageTk, Image
  import glob
  
  files = glob.glob('img\\*.jpg')
  
  class App:
  
      def __init__(self, root):
  
          self.l = Listbox(root, width = 50, height = 15)
          self.l.pack()
          self.l.bind('&lt;&lt;ListboxSelect&gt;&gt;', self.lol)
  
          self.c = Label(root)
          self.c.pack()
  
          for f in files:
              self.l.insert(END, f)
  
      def lol(self, evt):
  
          path = files[self.l.curselection()[0]]
          img = ImageTk.PhotoImage(Image.open(path))
          self.c.image = img
          self.c.pack()
  
  root = Tk()
  App(root)
  root.mainloop()
  </code></pre>
  
  <p>What am I missing?</p>