views:

16

answers:

0

To use the module apns-python-wrapper here: http://code.google.com/p/apns-python-wrapper/ you need to convert your iPhone's APNS device token, however, I'm not sure how to convert it.

Here is the fresh new token returned from the device: 8fa9c60685c158a3cf6f9c5de164b3817e68a075fcfdafcd982aa4b3d2ca99c7

And this is what it needs to look like: Qun\xaa\xd4R\x11zu\x07\x04\x9dG\xe6\x96j&\x95Y\x9d\x91~\xcc`z\n\x88O\xc0\x9c\xf6\xca

Note that is not a direct conversion. Any idea on how to convert the first token to the second in Python?