111

Posted 步行者811

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了111相关的知识,希望对你有一定的参考价值。

#导入相关模块
import mysqldb
import os
import re
#建立和mysql数据库的连接
conn = MySQLdb.connect(host=‘localhost‘,user=‘root‘,passwd=‘123lqh‘)
conn.select_db(‘slowquery‘)
curs = conn.cursor()
file=open("new2.txt")
x=()
j=()
for line in file.xreadlines():
    if ‘Count         :‘ in line:
        m=re.findall(r":(.+)",line)
        print m
    if ‘Time          :‘ in line:
        n=re.findall(r":(.+)",line)
        print n
for x in m :
    for j in n:
        print x+j

~

以上是关于111的主要内容,如果未能解决你的问题,请参考以下文章