"Øyvind" <[EMAIL PROTECTED]> wrote in message
> Is it possible to read the bits (the 0's and 1's) of a string or a file
> with Python? What module would I use?

Yes, you can read the bits by reading bytes and applying
bitmasks and bitwise operations.

You can get the bytes using the struct module (explained in
the File Handling topic of my tutor) and using bitmasks
with bitwise operators to extract bits is covered in the
Operating System topic of same.

-- 
Alan G
Author of the learn to program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld




_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to