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?
-- http://mail.python.org/mailman/listinfo/python-list