How to extrude a curve in 2 dimensions I am a complete noob to Blender, but have been using python for many years. I am trying to create a bunch of "wavy horseshoes" to make a 3d model (which I am intending to print with a 3d printer arriving later this week). 

Through a bit of internet hunting and some back of the envelope maths, I have come up with:

import bpy
from math import cos, pi, radians, sin

def Wave(distance, amplitude, speed, start):
    return amplitude * sin(speed * distance + start)

def Point(x, y, distance, amplitude, speed, start):
    return (x, y, Wave(distance, amplitude, speed, start))

def WavyHorseshoePoints(amplitude, speed, start):
    points = []
    for i in range(4):
        points.append((1+i,0,i))
    for theta in range(15,180,15):
        rads = radians(theta)
        points.append((5+5*sin(rads), 5-5*cos(rads), 4+rads))
    for i in range(4):
        points.append((5-i,10,4+pi+i))
    return [Point(x, y, d, amplitude, speed, start)
            for (x,y,d) in points]

def MakePolyLine(objname, curvename, cList, base_x, base_y, base_z, extrudery):
    curvedata = bpy.data.curves.new(name=curvename, type='CURVE')
    curvedata.dimensions = '3D'
    curvedata.extrude = extrudery

    objectdata = bpy.data.objects.new(objname, curvedata)
    objectdata.location = (base_x,base_y,base_z)
    bpy.context.scene.objects.link(objectdata)

    polyline = curvedata.splines.new('NURBS')
    polyline.points.add(len(cList)-1)
    for num in range(len(cList)):
        polyline.points[num].co = (cList[num])+(1,)

    polyline.order_u = len(polyline.points)-1
    polyline.use_endpoint_u = True

def MakeWavyHorseshoe(base_x, base_y, base_z, amplitude, speed, start, extrudery):
    MakePolyLine("WavyHorseshoe", "WavyHorseshoeCurve", WavyHorseshoePoints(amplitude, speed, start), base_x, base_y, base_z, extrudery)

for object in bpy.data.scenes['Scene'].objects:
    print(object.name+" is here")
    if object.name.startswith('Cube') or object.name.startswith('WavyHorseshoe'):
        bpy.data.scenes['Scene'].objects.unlink(object)

MakeWavyHorseshoe(0,0,1,1,1,0,0.2)


Now I have the curve I'm looking for, more or less, and the extrude has given it vertical height, but I'm looking for it to be 3-dimensional and have a "thickness". How would I go about this? Apologies if this question is trivial.
The easiest way would be to add a solidify modifier.  If you don't want to actually go through the mouse clicks the python would be

mod = objectdata.modifiers.new("2d is for weaklings", 'SOLIDIFY')
mod.thickness=0.1