bytes/hexa to human readable value?
<p>I want to learn packet decoder processing using <a href="http://www.code.google.com/p/dpkt" rel="nofollow">dpkt</a>. On the site, I saw the following example code:</p>

<pre><code>&gt;&gt;&gt; from dpkt.ip import IP
&gt;&gt;&gt; from dpkt.icmp import ICMP
&gt;&gt;&gt; ip = IP(src='\x01\x02\x03\x04', dst='\x05\x06\x07\x08', p=1)
&gt;&gt;&gt; ip.v4
&gt;&gt;&gt; ip.src
'\x01\x02\x03\x04'
&gt;&gt;&gt; ip.data
''
&gt;&gt;&gt; 
&gt;&gt;&gt; icmp = ICMP(type=8, data=ICMP.Echo(id=123, seq=1, data='foobar'))
&gt;&gt;&gt; icmp
ICMP(type=8, data=Echo(id=123, seq=1, data='foobar'))
&gt;&gt;&gt; len(icmp)
14
&gt;&gt;&gt; ip.data = icmp
&gt;&gt;&gt; ip.len += len(ip.data)
&gt;&gt;&gt; ip
IP(src='\x01\x02\x03\x04', dst='\x05\x06\x07\x08', len=34, p=1, data=ICMP(type=8, data=Echo(id=123, seq=1, data='foobar')))
&gt;&gt;&gt; pkt = str(ip)
&gt;&gt;&gt; pkt
'E\x00\x00"\x00\x00\x00\x00@\x01j\xc8\x01\x02\x03\x04\x05\x06\x07\x08\x08\x00\xc0?\x00{\x00\x01foobar'
&gt;&gt;&gt; IP(pkt)
IP(src='\x01\x02\x03\x04', dst='\x05\x06\x07\x08', sum=27336, len=34, p=1, data=ICMP(sum=49215, type=8, data=Echo(id=123, seq=1, data='foobar')))
</code></pre>

<p>I'm confused with lines that are using hexa such as:</p>

<pre><code>ip = IP(src='\x01\x02\x03\x04', dst='\x05\x06\x07\x08', p=1)
</code></pre>

<p>What is the meaning of "\x01\x02\x03\x04" and "\x05\x06\x07\x08"? Is it possible to convert strings like these to something more human-readable?</p>
