Python: Create a plane from selected vertex
A second draft would be

import bpy
import bmesh

def coordinates_for_new_plane():
    obj = bpy.context.active_object
    if bpy.context.mode != 'EDIT_MESH':
        raise BaseException("should be in edit mode")
    bm = bmesh.from_edit_mesh(obj.data)
    (v1, v2) = [v.co for v in bm.verts if v.select]
    new_coords = [
        [v1.x, v1.y - 100, v1.z + 10],
        [v1.x, v1.y - 100, v1.z - 10],
        [v2.x, v2.y + 100, v2.z - 10],
        [v2.x, v2.y + 100, v2.z + 10],
    ]
    return bm, new_coords, obj


def mission2():

    bm, new_coords, obj = coordinates_for_new_plane()

    name = "platypus"
    mesh = bpy.data.meshes.new(name)

    faces = []
    faces.append( [0,1,2,3])

    mesh.from_pydata(new_coords, [], faces)

    o2 = bpy.data.objects.new(name, mesh)

    scn = bpy.context.scene

    scn.objects.link(o2)

    o2.location = obj.location
    o2.rotation_euler = obj.rotation_euler
    o2.rotation_quaternion = obj.rotation_quaternion
    o2.scale = obj.scale

#
#
#

mission2()


The original code which adds geometry to the original object can be found as mission1() in my cookbook at http://web.purplefrog.com/~thoth/blender/python-cookbook/add-plane-from-selected-vertices.html .