#!/usr/bin/python file = open("temp","r") line = file.readline() while line: line = file.readline() pass