how can i select all objects by type using python
Blender 2.7x
import bpy

objects = bpy.context.scene.objects

for obj in objects:
    obj.select = obj.type == &quot;EMPTY&quot;

Blender 2.8x
import bpy

objects = bpy.context.scene.objects

for obj in objects:
    obj.select_set(obj.type == &quot;EMPTY&quot;)

See this answer for more info.