So I needed a way to represent a line in Python. My first stab was to create a function dynamically. But classes are so much ... classier, so here's a simple implementation of a line object, with plenty of room for additional methods.
The line is created as
l = Line(slope,intercept) *or*
l = Line(slope,Q) *or*
l = Line(P,Q)
where P and Q are (x,y) pairs.