Python base64编码解码实例
2015-06-21 00:00
615 查看
Python中进行Base64编码和解码要用base64模块,代码示例:
#-*- coding: utf-8 -*- import base64 str = 'cnblogs' str64 = base64.b64encode(str) print str64 #Y25ibG9ncw== print base64.b64decode(str64) #cnblogs
相关文章推荐
- Python中type的构造函数参数含义说明
- Python多线程和队列操作实例
- Python文件读取的3种方法及路径转义
- 让Python代码更快运行的5种方法
- Python ValueError: invalid literal for int() with base 10 实用解决方法
- Python实现删除文件但保留指定文件
- Python os模块学习笔记
- Python实现线程池代码分享
- Python安装第三方库的3种方法
- Python的装饰器模式与面向切面编程详解
- Python中有趣在__call__函数
- Python中实现三目运算的方法
- Python Property属性的2种用法
- python3.3:文本文件读取、处理及保存。小练习
- numpy安装问题
- python编程中的闭包函数
- [Python] Ubuntu12.04LTS
- python curses库
- 零基础项目制学习Python (一)
- python批量处理