推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
displayabc
V2EX  ›  Python

python 读取苹果推送的 Feedback,怎么解包啊?

  •  
  •   displayabc · Feb 7, 2015 · 2749 views
    This topic created in 4253 days ago, the information mentioned may be changed or developed.
    feedbackTime, tokenLength = struct.unpack_from('!lh', rev, 0)
    deviceToken = struct.unpack_from('%ds' % tokenLength, rev, 6)[0]

    代码这样,按APNSWrapper的来的,token实在不知道怎么解了,求助
    Supplement 1  ·  Feb 7, 2015
    好吧,这个解析出来是binary的,需要再进行一次binascii.hexlify,因为发送推送的时候有进行binascii.unhexlify
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1140 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 19ms · UTC 23:13 · PVG 07:13 · LAX 16:13 · JFK 19:13
    ♥ Do have faith in what you're doing.