I'm just messing around with bmesh and was trying to create a script that would extrude the edges I mark as sharp. Here's my code:
import bpy import bmesh from mathutils import Vector ob = bpy.context.object me = ob.data bm = bmesh.from_edit_mesh(me) selected_verts = [v for v in bm.faces if v.select] verts_to_extrude =  for e in bm.edges: if not e.smooth: verts_to_extrude.append(e) bmesh.ops.extrude_edge_only(bm, edges=verts_to_extrude) bmesh.update_edit_mesh(bpy.context.object.data)
Here is what it does:
Note: the code does not move the selected vertices, I just moved them out of the way so you could see what its doing.
It is doing what I want in that it is extruding the vertices marked sharp, but it leaves the original vertices I had selected, selected. Is there any way to make it so that it selects the extruded vertices and deselects the vertices I had selected before the operation?