Import custom file format into Blender I have some text files that contain the (x, y, z) values of points that make up a curve. How can I import this curve into blender, add some thickness, and, if possible, color the line by a fourth variable (like time)? 

As an example, here is a python script that prints x, y, z and t values for a spiral:

import numpy as np

t = np.linspace(0,10,100)

x = np.sin(t)
y = np.cos(t)
z = t

for vec in zip(x, y, z, t):
    print '%.2f %.2f %.2f %.2f'%(vec[0],vec[1],vec[2],vec[3])


And the output looks like my data files: 

0.00 1.00 0.00 0.00
0.10 0.99 0.10 0.10
0.20 0.98 0.20 0.20
0.30 0.95 0.30 0.30
0.39 0.92 0.40 0.40
0.48 0.88 0.51 0.51
0.57 0.82 0.61 0.61
0.65 0.76 0.71 0.71
0.72 0.69 0.81 0.81
0.79 0.61 0.91 0.91
0.85 0.53 1.01 1.01
0.90 0.44 1.11 1.11
0.94 0.35 1.21 1.21
0.97 0.25 1.31 1.31
0.99 0.16 1.41 1.41
...


How can I import this data into Blender? (Note: I have used the 3D surface plugin to draw lines and surfaces in Blender. This is not what I am asking here. In this case, I don't want to plot an equation, but experimental data from text files.)
One easy solution, though kind of "hacky", would be to append "v " (a lowercase v and a space) to the beginning of each line, and then importing it has a Wavefront .obj format.

So just do: print "v " + '%.2f %.2f %.2f %.2f'%(vec[0],vec[1],vec[2],vec[3])

In this example three vertices are defined, then they are automatically assigned an index from top to bottom;

v 0.00 1.00 0.00 0.00 #This is the index 1
v 0.10 0.99 0.10 0.10 #This is the index 2
v 0.20 0.98 0.20 0.20 #This is the index 3


Then, to define a "face" (a connection of 2 or more vertices) use:

f 1 2 3


Using this will define a face between the vertices of index 1, 2 and 3.

If, however, you want to only connect vertices with edges, you can use:

l 1 2


To define an edge between vertices  of index 1 and 2.

If you want a brief explanation, there's a Wikipedia page. For the complete specification, refer to this page.