Here is another example to take frames per second into account. For every sample in your file you will only insert one keyframe (assuming you want to interpolate linear between them).
... # read x,y,z and t from a file, assuming seconds for t
# and do something like this in a loop for all keys:
f = bpy.data.scenes["Scene"].render.fps * t + 1 # stub
obj = bpy.data.objects["Cube"] # stub
obj.location = [x,y,z]
# make interpolation between keyframes linear
for fc in obj.animation_data.action.fcurves: # stub
for kp in fc.keyframe_points:
kp.handle_left_type = 'VECTOR'
kp.handle_right_type = 'VECTOR'
If you need a higher resolution you could increase the Frame Rate in render settings or come up with a more sophisticated mapping of frames/seconds.
Edit: Assuming you have a file like this:
You could use pythons csv module to parse it in Blender like this:
csvf = open('/path/to/values.csv')
rd = csv.reader(csvf, delimiter=',')
for r in rd:
l = [float(x) for x in r]
xyz = l[:3] # location
t = l # time