code: def drawLine(self, p1, p2):
          
          p1 = Point(p1)
          p2 = Point(p2)
          if not (self.lastPoint == p1):
              self.draw_cont += "%g %g m\n" % JM_TUPLE(p1 * self.ipctm)
              self.lastPoint = p1
              self.updateRect(p1)
  
          self.draw_cont += "%g %g l\n" % JM_TUPLE(p2 * self.ipctm)
          self.updateRect(p2)
          self.lastPoint = p2
          return self.lastPoint
docs: Draw a line between two points.