title: Image on a button
body: <p>I expect the same output for both of the scripts below. </p>
  
  <p>But I don't get the image on the button when I execute <strong>Script 1</strong>. However, <strong>Script 2</strong> works well.</p>
  
  <p><strong>Script 1</strong></p>
  
  <pre><code>from Tkinter import *
    class fe:
      def __init__(self,master):
        self.b=Button(master,justify = LEFT)
        photo=PhotoImage(file="mine32.gif")
        self.b.config(image=photo,width="10",height="10")
        self.b.pack(side=LEFT)
  root = Tk()
  front_end=fe(root)
  root.mainloop()
  </code></pre>
  
  <p><strong>Script 2</strong></p>
  
  <pre><code>from Tkinter import *
  root=Tk()
  b=Button(root,justify = LEFT)
  photo=PhotoImage(file="mine32.gif")
  b.config(image=photo,width="10",height="10")
  b.pack(side=LEFT)
  root.mainloop()
  </code></pre>