#!/usr/bin/env pythonfname = raw_input('Enter filename: ')printtry: fobj = open(fname, 'r')except IOError, e: print "*** file open error:", eelse: for eachLine in fobj: print eachLine, fobj.close()