How to hook empties to points of a curve programmatically?
To add a hook modifier

Following code adds a hook modifier. named Hook1,  to the curve object CurveOB and sets the hook object to Empty1

hookmod = curveOB.modifiers.new("Hook1", type='HOOK')
hookmod.object = empty1