neutrino wrote:
Mmm, the output format that I want is like:
0001110011111111000000001111111100000000....

I tried your code on Cygwin under Windows 2000, and on Linux, but it
prints out ASCII characters.

Generally speaking, trying to work with binary like that will drive you mad. Most people find themselves far more productive learning to work with hexadecimal, which is nice in this case since you'll automatically get the hex representation of any non-printable character if you just print the string with repr() around it.

-Peter
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to