how to read bits from a file?,sys.stdout.write(chr(x))