tom = open('C:\\Python21\\RBRanch\\out\\stamp-images\\3\\dir.txt','r') tom2 = open('C:\\Python21\\RBRanch\\out\\stamp-images\\3\\dir.html','w+') filename = tom.readline() filename2 = tom.readline() counter =1 counter2 =2 while filename<>'' and filename2 <>'': outline = "" + str(counter) + "" + str(counter2) + "
" tom2.write(outline) #print outline filename = tom.readline() filename2 = tom.readline() counter = counter + 2 counter2 = counter2 + 2 del tom del tom2