Bits and bytes?

Christopher Armstrong radix at twistedmatrix.com
Wed Jun 12 15:57:04 CEST 2002


>>>>> "Guyon" == Guyon Morée <gumuz at looze.net> writes:

    Guyon> ok, this might be a strange question.... but i was wondering: how
    Guyon> can i read or write 'bits'?

    Guyon> if i have a string, how can i convert to it's basic 0's and 1's?

    Guyon> and offcourse, the other way around.... let's say i want to store
    Guyon> some bit-sequence(0011101110) to a file.


    Guyon> how do i do this?

http://twistedmatrix.com/users/moshez/binary.py

Moshe Zadka wrote this because he was annoyed at all the people in #python 
asking how to do this ;-)


-- 
                                Chris Armstrong
                         << radix at twistedmatrix.com >>
                http://twistedmatrix.com/users/carmstro.twistd/






More information about the Python-list mailing list