Pivot to bottom for all

How everyone knows, we have addon that make it easy, but only for one object(and you also need to go out from edit mode)

so maybe some one knows how to move pivot point all object in scene to bottom?

tryed

for ob in bpy.context.selected_objects:
bpy.contex.scene.objects.active = ob; bpy.ops.object.editmode_toggle(); bpy.ops.object.pivotobottom(); bpy.ops.object.editmode_toggle();

but no luck

ps: I guess we can move to scripting now