Howto get the filepath of a rendered animation frame with python
The filepath is stored in:

bpy.context.scene.render.filepath


However there is a function to find the output filename for a frame (the same function blender users internally).

output = bpy.context.scene.render.frame_path(frame=10)


example use:

&gt;&gt;&gt; bpy.context.scene.render.filepath = "/test/some_###_anim.png"
&gt;&gt;&gt; bpy.context.scene.render.frame_path(frame=10)
'/test/some_010_anim.png'