title: Convert data received from a socket.recv (bytes) to a boolean value in ironpython
body: <p>I am using a python script as a TCP client.  At one point it receives what should be a bool back from the server.  When I was first writing this and testing it on a machine that was using a regular python install I was able to use the following code from the struct module to unpack the data received back as a bool</p>
  
  <pre><code>data = socket.recv(BUFFER_SIZE)
  result = struct.unpack("?", data)[0]
  if not result:
      #do stuff here
  </code></pre>
  
  <p>I currently need to perform the same task in an environment that only uses ironpython.  When I attempt to run the code I get the following:</p>
  
  <pre><code>ImportError: No module named struct
  </code></pre>
  
  <p>After a bit of digging it seems that the struct module in regular python doesn't exist in ironpython (I believe a struct module exists, but it is for interfacing with c/c++ structs)</p>
  
  <p>How can I take the data from a TCP socket.recv and convert it from the bytes format actually received to the bool type I need it to be in ironpython?</p>