How can I tell what mesh selection mode blender is in
You can access this via the Scene property:


http://www.blender.org/api/blender_python_api_2_76_release/bpy.types.ToolSettings.html#bpy.types.ToolSettings.mesh_select_mode


Or if you're editing meshes using the BMesh API (if you're modifying the mesh in BMesh already).


http://www.blender.org/api/blender_python_api_2_76_release/bmesh.types.html#bmesh.types.BMesh.select_mode




Example to run in the console:

&gt;&gt;&gt; print(bpy.context.scene.tool_settings.mesh_select_mode)
&lt;bpy_boolean[3], ToolSettings.mesh_select_mode&gt;


To see the values, you can get get the sequence as a tuple

&gt;&gt;&gt; print(tuple(bpy.context.scene.tool_settings.mesh_select_mode))
(True, False, False)