备忘:
import os,sys
if __name__=='__main__':
if not sys.argv[1:]:
print "Usage: python bench_normal.py [OPTIONS] \n"
print "Options are:"
print "-t, --taskid <taskid>"
sys.exit(0)
TaskId='None'
i = 1
while (i<len(sys.argv)):
arg = sys.argv[i]
if arg=='-t' or arg=='--taskid':
i += 1
TaskId = sys.argv[i].upper()
else:
pass
i += 1
if TaskId=='None':
print "请输入任务ID"
sys.exit(0)