def queryCSV(csvfile): with open(csvfile) as f: print "loading records from {0}".format(csvfile) re = f.readlines() return pylab.array(re)