I have an object named "Cube" selected, and I set the mode to EDIT via
cube = bpy.data.objects.get('Cube')
cube.select=True
bpy.ops.object.mode_set(mode='EDIT')
I want to subdivide each edge into 3 parts. In the editor, I can click Tools -> Subdivide, and then adjust the number of cuts below in a menu.
I cannot find any methods of the bmesh object class to do this, though.