We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.

The encodings.hex_codec Module

(New in 2.2) HEX codec.

encoded_data = data.encode("hex")
decoded_data = encoded_data.decode("hex")