Popular recipes by Wenlong Liu http://code.activestate.com/recipes/users/4192273/2015-05-29T10:44:47-07:00ActiveState Code RecipesHex Dump (Python) 2015-05-29T10:44:47-07:00Wenlong Liuhttp://code.activestate.com/recipes/users/4192273/http://code.activestate.com/recipes/579064-hex-dump/ <p style="color: grey"> Python recipe 579064 by <a href="/recipes/users/4192273/">Wenlong Liu</a> (<a href="/recipes/tags/dump/">dump</a>, <a href="/recipes/tags/hex/">hex</a>, <a href="/recipes/tags/python/">python</a>). Revision 4. </p> <p>Hex dump a sequence of bytes.</p> <p>Sample output:</p> <pre class="prettyprint"><code> 0000000000: 33 C0 8E D0 BC 00 7C 8E C0 8E D8 BE 00 7C BF 00 3.....|. .....|.. 0000000010: 06 B9 00 02 FC F3 A4 50 68 1C 06 CB FB B9 04 00 .......P h....... 0000000020: BD BE 07 80 7E 00 00 7C 0B 0F 85 0E 01 83 C5 10 ....~..| ........ 0000000030: E2 F1 CD 18 88 56 00 55 C6 46 11 05 C6 46 10 00 .....V.U .F...F.. 0000000040: B4 41 BB AA 55 CD 13 5D 72 0F 81 FB 55 AA 75 09 .A..U..] r...U.u. 0000000050: F7 C1 01 00 74 03 FE 46 10 66 60 80 7E 10 00 74 ....t..F .f`.~..t 0000000060: 26 66 68 00 00 00 00 66 FF 76 08 68 00 00 68 00 &amp;fh....f .v.h..h. 0000000070: 7C 68 01 |h. </code></pre>