def hexdump(src, length=<NUM_LIT:8>):
if not src:<EOL><INDENT>return str(src)<EOL><DEDENT>src = input_validate_str(src, '<STR_LIT:src>')<EOL>offset = <NUM_LIT:0><EOL>result = '<STR_LIT>'<EOL>for this in group(src, length):<EOL><INDENT>hex_s = '<STR_LIT:U+0020>'.join(["<STR_LIT>" % ord(x) for x in this])<EOL>result += "<STR_LIT>" % (offset, hex_s)<EOL>offset += length<EOL><DEDENT>return result<EOL>
Produce a string hexdump of src, for debug output.