How do I create 2 Edge Loops adjacent to selected Edge Loop?
'Beveling' should achieve what you want. Select the edges you want to add other edges around and press Ctrl+B to bevel:



Increase the 'bevel segments' by either scrolling the mouse wheel up while bevelling or change it in the toolbar (T) after beveling to keep the original edge.

As to how you would do this programmatically you might start with this:

bpy.ops.mesh.bevel(offset=0.5, segments=2, vertex_only=False)


(Though it might be better to try and find an alternative to bpy.ops.., see this)