摘要:#!/usr/bin/pythontry: import jsonexcept ImportError: import simplejson as jsonimport sysif __name__=='__main__': compath=b"/LuoYun/conf/luoyun.conf" f=open(compath,"r") jsonstr="" for l in f.readlines(): if l[:5]=='JSON=': jsonstr=l[5:] jsonstr.strip() b
阅读全文
摘要:import getoptimport sysdef usage(): print(''' this is help message -h --help show help info -i --input the input file or directory -g --grep grep words -t --time modify time -v --verbose show verbose information ''') passdef main(): try: opts,args=getopt.getopt(sys.argv[1:],&
阅读全文