Determine whether or not you are in perspective or orthographic view

I’ve been up and down through the Blender Python API but can only find an op for toggling between ortho and perspective but not just definitively set the 3D View as one or the other. Many thanks to ye who reply!

• How can I return whether I’m in ortho or perspective?
• How can I set the view specifically to ortho or perspective and not just toggle it.

http://www.blender.org/documentation/blender_python_api_2_71_release/bpy.types.RegionView3D.html?highlight=ortho#bpy.types.RegionView3D.view_perspective

area -> spaces -> region_3d

Thanks. How would I write that down as a single line which could entered into the console and return ‘PERSP’, ‘ORTHO’ or ‘CAMERA’?

[area.spaces.active.region_3d.view_perspective for area in bpy.context.screen.areas if area.type == 'VIEW_3D']

returns a list of the view perspectives of all visible 3d views

This works. Thanks X.