Reading in the first 3 lines

Open file and read comment line:
infilename = sys.argv[1]
ifile = open(infilename, 'r') # open for reading
line = ifile.readline()
Read time step from the next line:
dt = float(ifile.readline())
Read next line containing the curvenames:
ynames = ifile.readline().split()

previousnexttable of contents