A small variation on Bowman's idea. But a problem is what is the max length of a line ? Working in SGML a line can be huge. fp=open('xxx.sgm') fp.seek(-1024,2) l=fp.readlines() print l[-1] --Darrell