Hello, I'm having trouble retrieving specific values (headers) from the basicproperties list.<div><br></div><div><br></div><div><p class="MsoNormal">def callback(ch, method, properties, body):<o:p></o:p></p>
<p class="MsoNormal"> #print " [x]
Received %r" % (body,)<o:p></o:p></p>
<p class="MsoNormal"> f =
open('/var/tmp/proto/sc2/delivery/TCG-proto','a+',0)<o:p></o:p></p>
<p class="MsoNormal"> f.write(body)<o:p></o:p></p>
<p class="MsoNormal"> f.write('\n')<o:p></o:p></p>
<p class="MsoNormal"> <span style="background:yellow;mso-highlight:yellow">prop = properties</span><o:p></o:p></p>
<p class="MsoNormal"> <span style="background:yellow;mso-highlight:yellow">print prop</span><o:p></o:p></p>
<p class="MsoNormal"> #print prop[1]<o:p></o:p></p>
<p class="MsoNormal"> #print
prop[“headers”]<o:p></o:p></p>
<p class="MsoNormal"> #print
prop.headers()<o:p></o:p></p>
<p class="MsoNormal"> print body<o:p></o:p></p>
<p class="MsoNormal"> test =
raw_input("Enter Something: ")<o:p></o:p></p><p class="MsoNormal">I tried treating it like a dict or a method, but it errors.</p><p class="MsoNormal">I just want headers, is there a easier way?</p><p class="MsoNormal">Here's the pika doc: <a href="https://pika.readthedocs.org/en/latest/_modules/pika/spec.html#BasicProperties" style="font-family: Calibri, sans-serif; font-size: 11pt;">https://pika.readthedocs.org/en/latest/_modules/pika/spec.html#BasicProperties</a></p><p class="MsoNormal">Sorry I'm both a python and ampq novice. Any feedback or info is greatly appreciated.<br></p></div>