How to access SpaceUVEditor?

I want to check uv_edit sticky_select_mode .
But the info [Editor Type] displays "[“Default”].(null) = ‘SHARED_VERTEX’ ".
… Confusing with the “(null)”.

Then. I look around in
" X:\Program Files\Blender Foundation\blender 2.6\2.65\scripts\startup\bl_ui\ ".

Found “”"

sima = context.space_data

uvedit = sima.uv_editor


But I can’t find uv_editor under context.space_data (Both edit and object mode).

Any one else can tell me How to access SpaceUVEditor?
. Thanks!!!

screen = bpy.context.window.screen
for area in screen.areas:
     if area.type == 'IMAGE_EDITOR':
         for space in area.spaces:
             if space.type == 'IMAGE_EDITOR':
                 UVspace = space
UVspace.uv_editor.sticky_select_mode = 'SHARED_VERTEX' #assign mode here

There may be a better way, but its the only way I know how. You have to have a UV/Image editor open.

This’s a Nice idea!!

Thank you cmomoney :yes: