How to create an empty per object in selection?
Update for 2.8 +
import bpy

for obj in bpy.context.selected_objects:  # Loop over all selected objects
    empty = bpy.data.objects.new(obj.name + &quot;_Empty&quot;, None)  # Create new empty object
    obj.users_collection[0].objects.link(empty)  # Link empty to the current object's collection
    empty.empty_display_type = 'PLAIN_AXES'
    empty.parent = obj

If you want the empties to be the parents :
import bpy

for obj in bpy.context.selected_objects:  # Loop over all selected objects
    empty = bpy.data.objects.new(obj.name + &quot;_Empty&quot;, None)  # Create new empty object
    obj.users_collection[0].objects.link(empty)  # Link empty to the current object's collection
    empty.empty_display_type = 'PLAIN_AXES'
    empty.location = obj.location
    obj.parent = empty
    obj.location = (0, 0, 0)