Image display and UV/Image Editor pop-up window

Hello.

Using Blender 2.6. I open an image using this instrucction:


bpy.ops.image.open(filepath="/home/poncho/pics/ponponpon.png")

It just opens the image, but it doesn’t display it on the UV/Image Editor.

I’m also have problems to pop out the UV/Image Editor window. If use this
instruction:


bpy.ops.render.render()

It only renders the image, but it doesn’t displays the UV/Image Editor.

+++++++++++++++++++++++++++++++++++++++++++
UPDATE:
I have found that I can invoke the UV/Image Editor window using this:


bpy.ops.render.view_show('INVOKE_SCREEN') 

But blender opens it on the same window, where I run the script. it doesn’t pop-up, I am trying to find the exact instruction to do that; but I can’t find it.

I have found that I can invoke the UV/Image Editor window using this:

bpy.ops.render.view_show('INVOKE_SCREEN')

But blender opens it on the same window, it doesn’t pop-up, I am trying to find the exact instruction but I can’t find it.

This forum wasn’t very helpful. You’ve to answer your own questions :(.

Well after spending a week trying to to this. I found this solution:


        filepath = self.user_path + os.sep + 'blenderpfx.png'
        
        result = self.begin_result(0, 0, scene.render.resolution_x, scene.render.resolution_y)
        layer = result.layers[0]
        layer.load_from_file(filepath)
        self.end_result(result)

Of course you can only do this, inside a class that inherits from RenderEngine, otherwise you will be out of damn context :S.

Here’s some thin and unexplained documentation:

http://www.blender.org/documentation/blender_python_api_2_62_release/bpy.types.RenderEngine.html?highlight=renderresult

I hope this will help you folks !!!

Could you send the whole class implementing this? Because I’m new here and cannot make it work based on the link and the lines of code you posted.

Thanks!