[Python-ideas] hexdump
Yuval Greenfield
ubershmekel at gmail.com
Mon Apr 29 13:32:46 CEST 2013
On Mon, Apr 29, 2013 at 11:59 AM, Antoine Pitrou <solipsis at pitrou.net>wrote:
>
> Actually, I think a hexdump() function in pprint would be a nice
> addition. I find myself wanting it when inspecting some binary protocols
> (e.g. pickle :-)).
>
Python 2.7 had
>>> 'alkdjfa'.encode('hex')
'616c6b646a6661'
So why not:
>>> b'asdf'.decode('hexdump')
'61 73 64 66'
Yuval
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130429/b81adbbf/attachment.html>
More information about the Python-ideas
mailing list