reload(module)

作用:
用于重新载入之前载入的模块。 module -- 模块对象。返回模块对象。 实例: 
重新载入 sys 模块,并设置默认编码为 utf8
 >>>import sys
>>> sys.getdefaultencoding() # 当前默认编码
'ascii'
>>> reload(sys) # 使用 reload
<module 'sys' (built-in)>
>>> sys.setdefaultencoding('utf8') # 设置编码
>>> sys.getdefaultencoding()
'utf8'
>>>
 
 

最新文章

  1. 在本地windows机器上安装SecureCRT客户端
  2. CMD 规范是不是就是 commonJS 规范?
  3. Struts2 之 对xwork的理解
  4. subprocess实现管道
  5. word to word
  6. svg学习(六)line
  7. IOS开发小项目—找色块游戏
  8. mac下为Apache 创建 .htaccess文件
  9. eclipse 下生成jar包
  10. 采用 HTML5 File API 达到client log
  11. 数据库索引的实现原理(笔记)详细http://www.linezing.com/blog/?p=798#nav-1
  12. Maven依赖解析
  13. php数据库备份脚本
  14. Mybatis集成到spring boot
  15. windows server 2008 r2 x64 enterprise service pack1中aspjpeg.dll安装
  16. ios -- 成员变量、实例变量与属性的区别
  17. 大数据处理框架之Strom: Storm----helloword
  18. ERROR org.redisson.client.handler.CommandDecoder - Unable to decode data. channel
  19. MongoDB 第一篇
  20. (20)模型层 -ORM之msql 基于双下划线的跨表查询(一对一,一对多,多对多)

热门文章

  1. MYSQL提权的各种姿势
  2. GIT生成 SSH Key步骤
  3. The revocation function was unable to check revocation for the certificate
  4. HTTP Message Handlers in ASP.NET Web API
  5. BZOJ:(270,300]
  6. Image合并添加文字内容
  7. crontab 参数详解
  8. Angular 2 Architecture Overview
  9. RadioButton实现多选一
  10. Ajax编程(HTTP请求与响应及API)详解