OSC.py 文件源码

python
阅读 37 收藏 0 点赞 0 评论 0

项目:chuck 作者: Calysto 项目源码 文件源码
def hexDump(bytes):
    """Useful utility; prints the string in hexadecimal"""
    for i in range(len(bytes)):
        sys.stdout.write("%2x " % (ord(bytes[i])))
        if (i+1) % 8 == 0:
            print(repr(bytes[i-7:i+1]))

    remainder = len(bytes) % 8
    if(remainder != 0):
        print(string.rjust("", (8-remainder)*3 - 1), 
              repr(bytes[i-len(bytes)%8:i+1]))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号