#!/usr/bin/python # Chaitanya Athale, IISER Pune 2015-Oct-11 #import numpy as np #path of the file p1 = "/Users/chaitanya/Documents/teaching/2015monsoon-fall/bio322/bio322-assignments/" fname = "testDat.txt" print p1+fname fname1 = p1+fname #tempname= 'out-perslen.txt' # Edit the data.in file to change some value try: iFile = open(fname1, 'r') #tFile = open(tempname, 'w') except IOError: print "Ooops! Can't open data.in file! Bye" type(iFile) # we want to process the data in the file for line1 in iFile.readlines(): print line1.split() #using pylab's loadtxt function #d = np.loadtxt([p1,"optimizedMT-imgROI.txt"],delimiter="\t") #print d[0,1]