Nov-27-2018, 08:27 PM
Please post entire error traceback verbatim
supple sample file if possible, or where it can be downloaded
b will read 1 byte, starting at byte number 1 in file
You don't show tuppleCounter
is this what you wanted?
You don't need to supply number base to int if decimal
If I try with random binary file:
supple sample file if possible, or where it can be downloaded
b will read 1 byte, starting at byte number 1 in file
You don't show tuppleCounter
is this what you wanted?
You don't need to supply number base to int if decimal
If I try with random binary file:
>>> with open('image_002.jpg', 'rb') as fp: ... b = fp.read(1) ... >>> b b'\xff' >>> for x in range( 0,4): ... tuppleCounter[ ( ( 3 << ( x * 2 ) ) & b ) >> ( x*2 ) ]+=1 ... Traceback (most recent call last): File "<stdin>", line 2, in <module> NameError: name 'tuppleCounter' is not defined