title: NameError: global name 'END' is not defined
body: <p>I have found this code about scrollbar is just working fine. </p>
  
  <pre><code>from tkinter import *
  
  master = Tk()
  
  scrollbar = Scrollbar(master)
  scrollbar.pack(side=RIGHT, fill=Y)
  
  listbox = Listbox(master, yscrollcommand=scrollbar.set)
  for i in range(10000):
      listbox.insert(END, str(i))
  listbox.pack(side=LEFT, fill=BOTH)
  
  scrollbar.config(command=listbox.yview)
  
  mainloop()
  </code></pre>
  
  <p>I try to use it in my code like this:</p>
  
  <pre><code>import tkinter as tk
  
  class interface(tk.Frame):
      def __init__(self,den):
          self.tklist() 
          #in my code, tklist is not called here. I called it here to minimize the code
          #there are stuff in here also
  
      def tklist(self):
          scrollbar = tk.Scrollbar(den)
          self.lst1 = tk.Listbox(den, selectmode="SINGLE", width="100", yscrollcommand=scrollbar.set)
          for i in range(1000):
              self.lst1.insert(END, str(i))
          self.lst1.pack(side=LEFT, fill=BOTH)
          scrollbar.config(command=lst1.yview)
  
  den = tk.Tk()
  den.title("Search")
  
  inter = interface(den)
  
  den.mainloop()
  </code></pre>
  
  <p>But when I ran above code, I got an error on insertion line.</p>
  
  <pre><code>NameError: global name 'END' is not defined
  </code></pre>
  
  <p>By the way, I tried to find documentation and <a href="http://effbot.org/tkinterbook/listbox.htm" rel="nofollow noreferrer">a link from effbot</a> is the closest I got but still couldn't understand what is wrong.</p>