发布时间:2019-09-11 07:42:16编辑:auto阅读(2666)
#!/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插件
53637
40470
34891
30612
25487
25267
23702
19145
15269
14785
1300°
1205°
1288°
1317°
1335°
1511°
1458°
1400°
1496°
1451°