发布时间:2019-09-11 07:42:16编辑:auto阅读(2051)
#!/usr/bin/python
# -*- coding:utf-8 -*-
import sys
def readFile(filename):
f = file(filename)
while True:
fileContext = f.readline()
if len(fileContext) ==0:
break;
print fileContext
f.close()
if len(sys.argv) < 2:
print "No function be setted."
sys.exit()
if sys.argv[1].startswith("-"):
option = sys.argv[1][1:]
if option == 'version':
print "Version1.2"
elif option == 'help':
print "enter an filename to see the context of it!"
else:
print "Unknown function!"
sys.exit()
else:
for filename in sys.argv[1:]:
readFile(filename)
上一篇: python + wxPython +
下一篇: vscode安装python插件
48940
48068
38814
35938
30355
27138
26138
20975
20799
19148
687°
758°
738°
738°
718°
674°
778°
855°
989°
1238°