获得图片的Base64编码,,python代码#!/u
获得图片的Base64编码,,python代码#!/u
python代码
#!/usr/bin/env python# -*- coding: utf-8 -*-'''@Author: renm79@126.com@Version: @Date: @Note: '''import os, base64icon = open('ya.png','rb')iconData = icon.read()iconData = base64.b64encode(iconData)LIMIT = 60liIcon = []while True: sLimit = iconData[:LIMIT] iconData = iconData[LIMIT:] liIcon.append('\'%s\'' %sLimit) if len(sLimit) < LIMIT: breakprint os.linesep.join(liIcon)
相关内容
- python修改操作系统时间的代码,python操作系统,#-*- cod
- python 抓去指定网页以及该网页上所有链接,python指定
- Python 支持上传的SimpleHTTPServer,,SimpleHTTPSe
- Python 随机生成中文验证码,python中文验证码,python代码
- Python : appendInt, appendShort, appendStr,,python代码impo
- Python 判断一个字节数组是否 beginsWith 另外一个字节数组
- Python 将 Byte Array 保存到文件,pythonarray,python代码impo
- Py4J 示例代码 (Python 调用 Java API),py4jpython,python代码
- python Huffman树,pythonhuffman树,[Python]代码#!
- python 3.3下结合tkinter做的比大小程序,pythontkinter,step1
评论关闭