#!/usr/bin/python# -*- coding: utf-8 -*-#RUN // Program Start # exit // program exits #start // hotspot start #stop // Hotspot Stop #onl // Client online #offl // client offline #install //Install #uninstall //uninstall import re# mode match Uuidpatternuid=re.compile (R ' (\w) {8}-(\w) {4}-(\w) {4}-(\w) {4}-( \w) {#定义Uid字典), used to drain uid={} #用来统计各种动作的次数actionCount ={ "A=run":0, "A=exit":0, "A=start":0, "A=stop":0, "a=onl":0, "A=offl":0, "A=install":0, "A=uninstall": 0}for k,v in actioncount.iteritems (): with open ("C:/users/administrator/desktop/python/result.txt") as f: for line in&nbsP;f: if patternuid.search (line): uidname= Patternuid.search (line) group () if k in line: if uid.has_key (UidName): pass else: uid[uidName]=1 actioncount[k]+= 1for k,v in actioncount.iteritems (): print k ,actioncount[k]
This article is from the "Record Drip" blog, please be sure to keep this source http://caozm.blog.51cto.com/1118764/1584955
Python-based on the UUID to get the number of requests to redo various actions