On 12 May 2012 09:59, anatoly techtonik email@example.com wrote:
hexdump(bytes) - produce human readable dump of binary data,
+1 on this basic function, that would be very nice in the stdlib. Now I always need to go and dig up my own function from somewhere.
A certain deal of bikeshedding would be required on the function signature however, I'd go with something like:
hexdump(data, rowsize=16, offsets=True, ascii=True)
Where rowsize is the number of bytes on one row, offsets controls showing the byte number (in hex) of the first byte of each row and ascii controls showing the 7-bit printable characters in a right hand column.
This would cover my needs, I'm sure other people will come up with more must-haves.