Tkinter slide question

Fred L. Drake Fred.L..Drake at
Tue Jun 29 14:31:50 EDT 1999

From: "Fred L. Drake" <fdrake at>

David Stokes writes:
 > Code snipit:
 > Scale(label="Rescan",variable=self.yspeed,orient=HORIZONTAL,).grid(column=0)
 > currently returns PY_VAR12 instead of the slider value.

  Appearantly, you're refering to self.yspeed to get the value of the
variable, although you seem to have initialized self.yspeed with an
instance of Tkinter.StringVar or one of it's friends.
  To get the value, use self.yspeed.get(); the object itself is simply 
a reference to a Tcl variable.  The get() method will return the value 
as the data type indicated by the name of the class you instantiated
to create self.yspeed.


Fred L. Drake, Jr.	     <fdrake at>
Corporation for National Research Initiatives

More information about the Python-list mailing list