12 2013 档案

摘要:import ref = open("beijing1.txt", "r")t = open("beijing2.txt", "w") while True: line = f.readline() if line: if 'np' in line and 'offline' in line : m=re.split("[|]",line) r1=r".*\?IMSI=(\d+)&MOBILE=&VERSION=(.*)&CHAN 阅读全文
posted @ 2013-12-04 16:04 沙漠里的小鱼 阅读(106) 评论(0) 推荐(0) 编辑
摘要:import ref = open("1205.txt", "r") m = open("1206.txt","w") while True: line = f.readline() if line: x=re.split("[|]",line) r1=r"\w+_(renow.+Alpha).*\?IMSI=(\d+)&MOBILE=&OLD_VERSION=(.*)&CHANNELID=(.*)" s=re.search(r1,x[2]) if s 阅读全文
posted @ 2013-12-04 15:27 沙漠里的小鱼 阅读(175) 评论(0) 推荐(0) 编辑
摘要:str = "0123456"if str.find("8")!=-1 or str.find("3")!=-1: print "YES!"else: print "NO!"会输出"YES!" 阅读全文
posted @ 2013-12-04 10:31 沙漠里的小鱼 阅读(1188) 评论(0) 推荐(0) 编辑
摘要:f = open("1.txt", "r") while True: line = f.readline() if line: else: break f.close() 阅读全文
posted @ 2013-12-03 11:15 沙漠里的小鱼 阅读(490) 评论(0) 推荐(0) 编辑
摘要:import cx_Oraclemap1={}map2={}con= cx_Oracle.connect("admin/admin@ssx")cursor=con.cursor()cursor.execute('select * from test1')rows = cursor.fetchall()print rowsfor x,y,z,m in rows : print x print y print z print m map1[x]=y key=','.join([str(x),str(y),str(z),str(m)]) map2[ 阅读全文
posted @ 2013-12-02 16:23 沙漠里的小鱼 阅读(231) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示