Print a string in binary format

2005-01-20 Thread neutrino
Greetings to the Python gurus, I have a binary file and wish to see the "raw" content of it. So I open it in binary mode, and read one byte at a time to a variable, which will be of the string type. Now the problem is how to print the binary format of that charater to the standard output. It seems

Re: Print a string in binary format

2005-01-20 Thread neutrino
Mmm, the output format that I want is like: 00011100 I tried your code on Cygwin under Windows 2000, and on Linux, but it prints out ASCII characters. -- http://mail.python.org/mailman/listinfo/python-list