Print a string in binary format
From: neutrino (hanchunhui_at_gmail.com)
Date: 01/21/05
- Next message: alex23: "Re: iteritems() and enumerate()"
- Previous message: John Machin: "Re: why no time() + timedelta() ?"
- Next in thread: Mark McEahern: "Re: Print a string in binary format"
- Reply: Mark McEahern: "Re: Print a string in binary format"
- Reply: Kartic: "Re: Print a string in binary format"
- Reply: Paul Rubin: "Re: Print a string in binary format"
- Reply: Nick Coghlan: "Re: Print a string in binary format"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 20 Jan 2005 16:53:22 -0800
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 a common task
but I just cannot find the appropriate method from the documentation.
Thanks a lot.
- Next message: alex23: "Re: iteritems() and enumerate()"
- Previous message: John Machin: "Re: why no time() + timedelta() ?"
- Next in thread: Mark McEahern: "Re: Print a string in binary format"
- Reply: Mark McEahern: "Re: Print a string in binary format"
- Reply: Kartic: "Re: Print a string in binary format"
- Reply: Paul Rubin: "Re: Print a string in binary format"
- Reply: Nick Coghlan: "Re: Print a string in binary format"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
Loading