Use offset factor of follow path constraint.
Use the offset factor of follow curve constraint.
Test script, select the curve in object mode and run script.
import bpy
context = bpy.context
scene = context.scene
curve_obj = context.object
spline = curve_obj.data.splines[0]
bpy.ops.mesh.primitive_ico_sphere_add(size=0.05, location=(0, 0, 0))
sphere = context.object
fp = sphere.constraints.new(type='FOLLOW_PATH')
fp.target = curve_obj
fp.use_fixed_location = True
res = len(spline.bezier_points)
spheres = [sphere]
o = 0 if spline.use_cyclic_u else 1
r = spline.resolution_u + 1
pts = (res + o) * r
for i in range(1, pts + o):
s = sphere.copy()
sc = s.constraints[0]
sc.offset_factor = i / pts
scene.objects.link(s)
spheres.append(s)
To remove the constraints, and keep their constraint location
# remove constraints
scene.update()
for s in spheres:
sc = s.constraints[0]
s.location = s.matrix_world.translation
s.constraints.remove(sc)