To get north azimuth angles; try it:
>>> for x1y1x2y2 in [(0,0,1,1),(0,0,1,-1),(0,0,-1,-1),(0,0,-1,1)]:
... x1,y1,x2,y2 = x1y1x2y2[0],x1y1x2y2[1],x1y1x2y2[2],x1y1x2y2[3]
... print str(math.degrees(math.atan2((x2 - x1),(y2 - y1))))
...
45.0
135.0
-135.0
-45.0
The += is shorthand for degBearing = degBearing + 360.0