Viewing Binary Data

Paul Watson pwatson at
Sun Jan 8 13:38:38 EST 2006

Cuyler wrote:
> I would like to display a file in its binary form (1s and 0s), but I'm
> having no luck... Any thoughts would be most appreciated.

If you are on a UNIX system, or on Windows with Cygwin, you can use the 
'od' command to dump a file in hex or octal.

	man od
	od -Ax -tx1

More information about the Python-list mailing list