Pertaining to this question, from which I got the following code to change the 3D View to orthographic top view for the purposes of projecting and snapping vertices to other objects in preparation for texture baking:
import bpy
for area in bpy.context.screen.areas:
if area.type == "VIEW_3D":
override = bpy.context.copy()
override["area"] = area
bpy.ops.view3d.view_axis(override, type='TOP', align_active=False)
if area.spaces.active.region_3d.is_perspective:
bpy.ops.view3d.view_persportho(override)
How could I "save" the 3D View parameters as they are before running the script so I can then return the user to their original view when the baking is complete?