Ulrich Eckhardt wrote: > data = f.read() > for byte in data: > for i in range(8): > bit = 2**i & byte > ... Correction: Of course you have to use ord() to get from the single-element string ("byte" above) to its integral value first. Uli -- Sator Laser GmbH Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932