Drawing a line using Python script
some good reference: adding geometry

note that you must be in editmode (EDIT: to go to edit mode, create a mesh, select it with right-click, and then hit "tab"), and remove doubles after run the script:

import bpy, bmesh

obj = bpy.context.object
me = obj.data
bm = bmesh.from_edit_mesh(me)

v1 = bm.verts.new((2.0, 2.0, 2.0))
v2 = bm.verts.new((-2.0, 2.0, 2.0))
v3 = bm.verts.new((-2.0, -2.0, 2.0))


bm.edges.new((v1, v2))
bm.edges.new((v2, v3))

bmesh.update_edit_mesh(obj.data)


if you have the point list, may be you can apply some loops