title: Python decode AMF response
body: <p>I'm making a request in python to a web service which returns AMF. I don't know if it's AMF0 or AMF3 yet.</p>
  
  <pre><code>r = requests.post(url, data=data)
  &gt;&gt;&gt; r.text
  u'\x00\x03...'
  </code></pre>
  
  <p>(<a href="http://pastebin.com/sdZnU8Ds" rel="nofollow">Full data here</a>)</p>
  
  <p>How can I take <code>r.text</code> and convert it to a python object or similar? I found <a href="http://code.google.com/p/amfast/" rel="nofollow">amfast</a> but it's <code>Decoder</code> class returns a <code>3.131513074181806e-294</code> assuming AMF0 and <code>None</code> for AMF3. (Both incorrect)</p>
  
  <pre><code>from amfast.decoder import Decoder
  decoder = Decoder(amf3=False)
  obj = decoder.decode(StringIO.StringIO(r.text))
  </code></pre>