Active image of UV/Image Editor After creating an image using:

bpy.data.images.new(name="NewImage2", width=512, height=512)


How would I set that image to the active image within the UV/Image Editor in Python?
You loop through area till you find the UV/Image editor and set the active image to you image

for area in bpy.context.screen.areas :
    if area.type == 'IMAGE_EDITOR' :
            area.spaces.active.image = my_img