title: Using Python How can I read the bits in a byte?
body: <p>I have a file where the first byte contains encoded information.  In Matlab I can read the byte bit by bit with <code>var = fread(file, 8, 'ubit1')</code>, and then retrieve each bit by <code>var(1), var(2)</code>, etc.</p>
  
  <p>Is there any equivalent bit reader in python?</p>