Need help to extract binary data from pickle
<p>In MMO game user account statistics stored in .dat file. I know this is python pickle.
Im not professional in py (really i dont know this language) all then i can wrote</p>

<pre><code>data = pickle.load(fp)
pprint.pprint(data)
</code></pre>

<p>And i get output like these</p>

<pre><code>(8,
 {(2, 1): (1315840806,
'\x14\x00&amp;#nNWH\x00\x00\x06\x90\xb3\x00\... lostsa bytes),
  (2, 17): (1327141794,
"\x14\x00\xa2\x93\x1aOS=\x00\x00\x06T\xaa\x00\x00\x8d\x06&gt;\x00\x00\x00*\...
</code></pre>

<p>I wanna to extract information from this. Format should be like these</p>

<pre><code>offs byte
  0  11
  1  00
  2  ac ;last batt time(4)
  3  8d ;last batt time(4)
  4  54 ;last batt time(4)
  5  4d ;last batt time(4)
  6  e8 ;battle lifetime(4)
  7  69 ;battle lifetime(4)
  8  00 ;battle lifetime(4)
  9  00 ;battle lifetime(4)
 10  04 ;maxfrags (1)
 11  db ;xp (4)
 12  95 ;xp (4)
 13  00 ;xp (4)
 14  00 ;xp (4)
 15  6f ;maxXP (2)
 16  06 ;maxXP (2)
</code></pre>

<p>and so on...</p>

<p>I has no idea how to get byte code in python, and what king of data is </p>

<pre><code>(8,
 {(2, 1): (1315840806,
</code></pre>

<p>object? array? How to iterate over it. And how i can save data as binary string to analyse it? Code sample is appreciated, but some ways to move on should be useful to. Thanx.</p>
