摘要: 1 import time 2 import pymysql 3 import threading 4 from DBUtils.PooledDB import PooledDB, SharedDBConnection 5 POOL = PooledDB( 6 creator=pymysql, # 阅读全文
posted @ 2018-12-11 17:19 python杰 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 1 # b'\x81\x83\xceH\xb6\x85\xffz\x85' 2 3 hashstr = b'\x81\x83\xceH\xb6\x85\xffz\x85' 4 # b'\x81 \x83 \xceH\xb6\x85\xffz\x85' 5 6 # 将第二个字节也就是 \x83 第9- 阅读全文
posted @ 2018-12-11 17:17 python杰 阅读(254) 评论(0) 推荐(0) 编辑
摘要: class BaseHandler(object): def __init__(self): self._request_middleware = None self._view_middleware = None self._template_response_middleware = None 阅读全文
posted @ 2018-12-11 14:24 python杰 阅读(467) 评论(0) 推荐(0) 编辑
摘要: 不要采用IO操作,容易出现问题,for循环执行效率要快于with open的效率,错误代码如下: 阅读全文
posted @ 2018-12-11 14:20 python杰 阅读(1528) 评论(0) 推荐(0) 编辑