Cursor in UV/Image Editor

Hi everybody!

I would like to have a coordinates of 2D cursor in UV/Image Editor. I tried to use >[FONT=NimbusMonL-Regu][SIZE=2] bpy.types.SpaceUVEditor.cursor_location but it not work…
:([SIZE=2]
>>> bpy.types.SpaceUVEditor.cursor_location
Traceback (most recent call last):
File “<blender_console>”, line 1, in <module>
AttributeError: type object ‘SpaceUVEditor’ has no attribute ‘cursor_location’

Please, can you help me?:rolleyes:

Many thanks.
Pavel[/SIZE][/SIZE][/FONT]

if you are in UV editor context:

context.space_data.cursor_location

If you run from different context, but UV editor is visible:

for area in bpy.context.screen.areas:
    if area.type == 'IMAGE_EDITOR':
        print(area.spaces[0].cursor_location)
        # Note: there can be multiple uv editors with different cursor locations!
        #break # uncomment this to stop after first uv editor if that's enough for you

Great !!! Thank you very much CoDEmanX!

Thank you CoDEmanX !!! :D:D:D