This is something i've been meaning to do for a long time, here is a coil generator. Rather than pasting all the code here,
this is the final (as it stands now) coil script with UI.
for a longer description of the script development visit blenderpython.tumblr/coil_spring
for a longer description of the script development visit blenderpython.tumblr/coil_spring