tornado
文章平均质量分 66
gtfaww
好好学习,天天向上。
展开
-
tornado request.arguments \xe6\x9b\xb9\...问题
用tornado 框架,参数里面有个json格式,发现个奇怪问题:页面编码:# -*- coding: utf-8 -*-打印日志是:'text': ['{"subject":"gtf","content":"91djfald\xe6\x9b\xb9\xe7\x8e\x95\xe7\x8e\x95","url":[]}'],进入post方法获取的参数:原创 2016-11-04 13:32:28 · 378 阅读 · 0 评论 -
tornado协程(coroutine)
tornado中的协程是如何工作的本文将按以下结构进行组织,说明tornado中协程的执行原理协程定义生成器和yield语义Future对象ioloop对象函数装饰器coroutine总结协程定义Coroutines are computer program components that generalize subroutines for nonpree转载 2016-11-29 17:07:35 · 497 阅读 · 0 评论 -
tornado coroutine使用
工作中想在tornado里面封装个异步发送http请求的公共方法,代码如下:@tornado.gen.enginedef asyn_send_http_req(reqUrl, parm): try: client = tornado.httpclient.AsyncHTTPClient() httpReq = tornado原创 2016-10-28 11:02:21 · 428 阅读 · 0 评论 -
tornado学习总结
tornado主要包括以下部分:Web frameworktornado.web — RequestHandler and Application classestornado.template — Flexible output generation 灵活生成输出tornado.escape — Escaping and string manipu原创 2017-02-07 13:37:54 · 400 阅读 · 0 评论 -
使用TorMysql异步访问mysql
使用TorMysql异步访问mysql使用TorMysql异步访问mysql下载地址代码下载地址https://github.com/snower/TorMySQL代码import loggingimport tracebackimport tormysqlfrom tormysql import DictCursorfrom t...原创 2018-07-01 16:02:38 · 1751 阅读 · 1 评论