I have managed to get the enemy ai moving towards the player using this code (python and pyglet):
(dx, dy) = ((player.x - self.x)/math.sqrt((player.x - self.x) ** 2 +
(player.y - self.y) ** 2),(player.y - self.y)/math.sqrt((player.x - self.x)
** 2 + (player.y - self.y) ** 2))
newCoord = (self.x + dx * 3, self.y + dy * 3)
self.x,self.y = newCoord
However I am unsure of how to rotate the enemy sprite so they are facing the player. I am pretty sure that I could use some of the code above and rotate the player accordingly but I haven't been able to find a way that works.