title: Python 3.4/Tkinter cross class variable accessing
body: <pre><code>__author__ = 'rvncpn'
  
  import tkinter
  from tkinter import ttk
  
  
  class layOut(tkinter.Tk):
      volts = 0
      amps = 0
      ohms = 0
  
      def updizzle(self):
          layOut.volts = layOut.ve.get()
          layOut.amps = layOut.ie.get()
          layOut.ohms = layOut.re.get()
  
      def __init__(self, *args, **kwargs):
          tkinter.Tk.__init__(self, *args, **kwargs)
          container = ttk.Frame(self)
          container.grid(columns=3, rows=3, sticky='nsew')
          tkinter.Tk.title(self, 'Ohms Law v2')
  
          v = ttk.Label(container, text='Volts')
          v.grid(column=0, row=0)
  
          i = ttk.Label(container, text='Amperes')
          i.grid(column=1, row=0)
  
          r = ttk.Label(container, text='Ohms')
          r.grid(column=2, row=0)
  
          ve = ttk.Entry(container)
          ve.grid(column=0, row=1)
  
          ie = ttk.Entry(container)
          ie.grid(column=1, row=1)
  
          re = ttk.Entry(container)
          re.grid(column=2, row=1)
  
          button = ttk.Button(container, text='Button', command=layOut.updizzle)
          button.grid(column=2, row=2,pady=6)
  
          answer = ttk.Label(container, text='32095782hirjfkebfesfme')
          answer.grid(column=0, row=2, columnspan=2)
  
  
  class ohms(layOut):
      def __init__(self):
          self.v = layOut.volts
          self.i = layOut.amps
          self.r = layOut.ohms
          self.w = []
  
      def sorter(self):
          if self.v &gt; 0:
              self.w.append('volts')
          if self.i &gt; 0:
              self.w.append('amps')
          if self.r &gt; 0:
              self.w.append('ohms')
  
      def listCheck(self):
          if 'volts' in self.w and 'amps' in self.w and 'ohms' in self.w:
              print('you must leave one of the perimeter empty')
          elif 'volts' in self.w and 'amps' in self.w:
              print('resistance =', self.v / self.i)
          elif 'volts' in self.w and 'ohms' in self.w:
              print('amps =', self.i / self.i)
          elif 'amps' in self.w and 'ohms' in self.w:
              print('volts=', self.i * self.r)
          else:
              pass
  
  
  app = layOut()
  app.mainloop()
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>TypeError: updizzle() missing 1 required positional argument: 'self'
  </code></pre>
  
  <p>Can not figure this out for the life of me I know its going to be something simple and I'm going to kick myself.</p>