zoukankan
html css js c++ java
python 读取二进制文件 转为16进制输出
示例:
#!/usr/bin/env python
#encoding: utf-8
import binascii
fh = open(r
'C:Tempimg2012517165556.png',
'rb')
a = fh.read()
#print 'raw: ',`a`,type(a)
hexstr = binascii.b2a_hex(a)
print a
print hexstr #示意结果为4d5a900003000000....
查看全文
相关阅读:
205. Isomorphic Strings
8 旋转数组的最小数字
303. Range Sum Query
70. Climbing Stairs
HDU 5971 Wrestling Match (二分图)
URAL 2019 Pair: normal and paranormal (STL栈)
URAL 2021 Scarily interesting! (贪心+题意)
URAL 2018 The Debut Album (DP)
HDU 5236 Article (概率DP+贪心)
HDU 5241 Friends (大数)
原文地址:https://www.cnblogs.com/bonelee/p/8267727.html
最新文章
[转载]GMT系列七 psbasemap, pstext, pslegend和psscale命令
[转载]教你用MATLAB做季节性调整
baseline_correction_matlab
matlab 时间序列预处理
shell学习笔记汇总——1
C条件编译
多线程进程之间共享全局变量需要加锁吗
Makefile笔记——汇总
systemd学习
BT601. BT709色彩空间
热门文章
HDMI接口基本信息
ioctl命令
V4L2 subdev
.gitignore忽略git版本库中的文件(夹)
443. String Compression
724. Find Pivot Index
697. Degree of an Array
717. 1-bit and 2-bit Characters
720. Longest Word in Dictionary
447. Number of Boomerangs
Copyright © 2011-2022 走看看