from Tkinter import *
class ScaleTest :
def CloseMe(self) :
self.value = self.scale.get()
self.root.destroy()
def __init__(self) :
self.value = 0
self.root = Tk()
self.root.geometry("500x300")
self.scale = Scale( self.root, from_=0, to=100, orient=HORIZONTAL )
self.scale.pack()
Button( self.root, text="Close", command=self.CloseMe ).pack()
self.root.mainloop()
st = ScaleTest()
print "Value = " + str(st.value)