title: global name "IntVar" not defined
body: <p>I defined a class and variables inside that class.
  I preceded all the variable names with self.varname.
  I don't know what is wrong, but I keep getting "global name 'IntVar' not defined" when trying to run the script</p>
  
  <p>This is part of the code:</p>
  
  <pre><code>import tkinter as tk
  from tkinter import Frame, Button, Label
  import time
  import random
  
  class fragal(tk.Frame):
      def __init__(self, master=None):
          tk.Frame.__init__(self, master)
          self.grid()
          self.mymaster = master
          self.primes = []
          self.cntr1a = 0
          self.cntr1b = 0
          self.cntr2a = 0
          self.cntr2b = 0
          self.count = IntVar()
          self.count.set(0)
          self.time_remaining = IntVar()
          self.time_remaining.set(0)
          self.gamearray = []
          self.equation = StringVar()
          self.equation.set("")
  </code></pre>
  
  <p>Please help!  I have several versions of my program and this version was
  working until I started changing the main() loop.</p>