Write bits in file

Ken Starks straton at lampsacos.demon.co.uk
Sun May 18 08:20:14 EDT 2008


You want your file considered as a sequence of bits rather
than a sequence of 8-bit bytes, do you? is the 10-bit
bit-pattern to be stored at an arbitrary bit-position in
the file, or is the whole file regularly subdivided
at 10-bit intervals?


Monica Leko wrote:
> Hi
> 
> I have a specific format and I need binary representation.  Does
> Python have some built-in function which will, for instance, represent
> number 15 in exactly 10 bits?



More information about the Python-list mailing list