Python Slider Value
<p>I have a Scale in my GUI which I'm trying to get continuous values from. Below is my code. </p>

<pre><code>from Tkinter import *
class Application(Frame):
   def getVoltage(self):
      print self.voltage_scale.get()
   def createWidgets(self):
      self.voltage_scale = Scale(self)
      self.voltage_scale["from_"] = 0
      self.voltage_scale["to"] = 32
      self.voltage_scale["orient"] = "horizontal"
      self.voltage_scale["command"] = self.getVoltage
      self.voltage_scale.grid(column=0,row=9)
   def __init__(self,Master=None)
      Frame.__init__(self,master)
      self.createWidgets()
      self.tn = None
root = Tk()
app = Application(master=root)
app.mainloop()
root.destroy()
</code></pre>

<p>When I run the code above, and start moving my slider, I get an error that says:</p>

<pre><code>getVoltage() takes exactly 1 argument, two was given
</code></pre>

<p>All I'm trying to do is get the value of the slider. Any help would be appreciated.</p>

<p><code>def getVoltage(self, event_arg):</code> will fix that. The command of some tk controls is passed some event data as an extra argument</p>

python user-interface tkinter tk