code: def _on_entry(self, event):
          
          contents = self._entry.get()
          if contents == "":
              return
          try:
              value = self._variable.set(int(contents))
          except ValueError:
              value = None
          if not value:
              self._on_scale(None)
docs: Callback for the Entry widget, sets the Scale variable to the appropriate value.
          
          :param event: Tkinter event