title: How to read integers from a file that are 24bit and little endian using Python?
body: <p>Is there an easy way to read these integers in? I'd prefer a built in method, but I assume it is possible to do with some bit operations.<br>
  Cheers</p>
  
  <p><strong>edit</strong><br>
  I thought of another way to do it that is different to the ways below and in my opinion is clearer. It pads with zeros at the other end, then shifts the result. No if required because shifting fills with whatever the msb is initially.</p>
  
  <pre><code>struct.unpack('&lt;i','\0'+ bytes)[0] &gt;&gt; 8
  </code></pre>