#/usr/bin/env
#coding:utf8
import os,sys
def getline(filepath,line_num):
if line_num < 1:
return ''
for current_line_num,line in enumerate(open(filepath,'rU')):
if current_line_num == line_num -1:
print current_line_num + 1 ,'->' ,line
return ''
if __name__=="__main__":
filepath=sys.argv[1]
line_num=int(sys.argv[2])
getline(filepath,line_num)
阅读(1121) | 评论(0) | 转发(0) |