def draw_line(self, p0, p1, colour):

        x0, y0 = p0
        x1, y1 = p1
        dx = abs(x0 - x1)
        dy = abs(y0 - y1)
        sx = 1 if x0 < x1 else -1
        sy = 1 if y0 < y1 else -1
        err = dx - dy

        while (x0, y0) != (x1, y1):
            self.set_pixel(x0, y0, colour)
            e2 = 2 * err
            if e2 > -dy:
                err -= dy
                x0 += + sx
            if e2 < dx:
                err += dx
                y0 += sy
        self.set_pixel(x1, y1, colour)
Returns a python dictionary which can be turned into a HAR file via conversion to JSON.
dataset/ETHPy150Open jerith/depixel/depixel/io_png.py/Bitmap.draw_line--crossover with--dataset/ETHPy150Open linkedin/mobster/src/linkedin/mobster/har/flowprofiler.py/FlowProfiler.make_har