Blender Python Scripting Screen Layout Closes on Execution in Windows OS
Thanks very much for the responses. Zeffii is correct, I had used the following code to delete all objects, but it was also resetting the view. Removing the below code resolves the issue. Thanks again.

def reset_blend():
    bpy.ops.wm.read_factory_settings()

    for scene in bpy.data.scenes:
        for obj in scene.objects:
            scene.objects.unlink(obj)

    for bpy_data_iter in (
            bpy.data.objects,
            bpy.data.meshes,
            bpy.data.lamps,
            bpy.data.cameras,
            ):
        for id_data in bpy_data_iter:
            bpy_data_iter.remove(id_data)

reset_blend()