def show_image_in_image_editor(image):
    for area in bpy.context.screen.areas:
        if (area.type == 'IMAGE_EDITOR'):
            area.spaces.active.image = image
def show_image_in_image_editor(image):
    for area in bpy.context.screen.areas:
        if (area.type == 'IMAGE_EDITOR'):
            area.spaces.active.image = image