code: def drawPolyline(self, points):
          
          for i, p in enumerate(points):
              if i == 0:
                  if not (self.lastPoint == Point(p)):
                      self.draw_cont += "%g %g m\n" % JM_TUPLE(Point(p) * self.ipctm)
                      self.lastPoint = Point(p)
              else:
                  self.draw_cont += "%g %g l\n" % JM_TUPLE(Point(p) * self.ipctm)
              self.updateRect(p)
  
          self.lastPoint = Point(points[-1])
          return self.lastPoint
docs: Draw several connected line segments.