python模块wsgiref使用
2015-09-23 16:54
393 查看
输出中文内容报错如下:
self.status.split(' ',1)[0], self.bytes_sent
需要指定返回编码:
参考:http://stackoverflow.com/questions/21059640/wsgiref-error-attributeerror-nonetype-object-has-no-attribute-split
self.status.split(' ',1)[0], self.bytes_sent
需要指定返回编码:
return [stdout.getvalue().encode("gbk")]
参考:http://stackoverflow.com/questions/21059640/wsgiref-error-attributeerror-nonetype-object-has-no-attribute-split
相关文章推荐
- 翻译-精通python设计模式-工厂模式
- 翻译-精通python设计模式-工厂模式
- python闭包
- Python 学习 (一) python的基本数据类型 元组 列表 字典
- python sorted operator.itemgetter
- python的编码问题
- python中的内建函数----reduce()
- ubuntu 安装python3
- 更换Mac python版本 & pycharm 版本
- pip:python包管理安装工具
- python 文件读写
- 【代码片段】python战舰
- python+django+新浪sae+有道API实现微信服务号自动翻译
- Ansible基本部署&&常用模块
- 正则表达式问题记录
- [原]打造Python开发环境之Python环境
- python 版websocket实现
- python常用代码
- 零基础学python-19.2 列表解析与序列映射函数map(2)增加分支测试与嵌套循环
- 零基础学python-19.2 列表解析与序列映射函数map(2)增加分支测试与嵌套循环