#/usr/bin/env python
#-*- coding: UTF-8 -*-
filename = raw_input('Enter filename:')
print # 打印空行
#attempt to open file for reading
try:
fobj = open(filename,'r')
except IOError,e:
print '*** file open error:',e
else:
for eachline in fobj:
print eachline
fobj.close()python