title: How to send a dict of namedtuples or just a namedTuple to a client (socket)?
body: <p>Simply put, I have a dictionary (<code>dictData[name]=namedTuple</code>) of namedTuples (records) on a server.</p>
  
  <p>Objective: I want to send the entire thing (<code>dictData</code>) or a single instance (<code>dictData[key]</code>) to the client via a SOCKET connection so it can be printed (shown on screen).</p>
  
  <p>To send a single record I have tried to do the following:</p>
  
  <pre><code>response = dictData["John"]
  print (response) #ensure it is the correct record
  s.send(response)
  </code></pre>
  
  <p>However this generates the following error:</p>
  
  <pre><code>"TypeError: 'record' does not support the buffer interface"
  </code></pre>
  
  <p>I have tried to encode it and convert it but nothing I do seems to work. I am even open to converting it to a STRING and sending the string but I can't seem to find out how to convert a namedTuple to a string either.</p>
  
  <p>And then, no clue where to start to send the entire dictionary to the client so they can print the entire set?</p>
  
  <p>Any help would be much appreciated.</p>