def set_from_string(self, pts):
    self.points[:] = []
    vals = pts.split()
    pairs = list(zip(vals[0::2], vals[1::2]))
    for (x, y) in pairs:
        self.points.append((float(x), ast.literal_eval(y)))
    self.points.sort()
    dispatcher.send('points changed', sender=self)
def set_from_string(self, pts):
    self.points[:] = []
    vals = pts.split()
    pairs = list(zip(vals[0::2], vals[1::2]))
    for (x, y) in pairs:
        self.points.append((float(x), ast.literal_eval(y)))
    self.points.sort()
    dispatcher.send('points changed', sender=self)