Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #26658
| From | Tobiah <toby@tobiah.org> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: [newbie] String to binary conversion |
| References | <jvpafd$vig$1@news.albasani.net> |
| Message-ID | <0fWTr.70$Bw1.65@newsfe05.iad> (permalink) |
| Organization | TeraNews.com |
| Date | 2012-08-06 13:59 -0700 |
The binascii module looks like it might have something for you. I've never used it. Tobiah http://docs.python.org/library/binascii.html On 08/06/2012 01:46 PM, Mok-Kong Shen wrote: > > If I have a string "abcd" then, with 8-bit encoding of each character, > there is a corresponding 32-bit binary integer. How could I best > obtain that integer and from that integer backwards again obtain the > original string? Thanks in advance. > > M. K. Shen
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[newbie] String to binary conversion Mok-Kong Shen <mok-kong.shen@t-online.de> - 2012-08-06 22:46 +0200
Re: [newbie] String to binary conversion Tobiah <toby@tobiah.org> - 2012-08-06 13:59 -0700
Re: [newbie] String to binary conversion Tobiah <toby@tobiah.org> - 2012-08-06 14:01 -0700
Re: [newbie] String to binary conversion Mok-Kong Shen <mok-kong.shen@t-online.de> - 2012-08-06 23:33 +0200
Re: [newbie] String to binary conversion MRAB <python@mrabarnett.plus.com> - 2012-08-06 22:56 +0100
Re: [newbie] String to binary conversion Emile van Sebille <emile@fenx.com> - 2012-08-06 15:45 -0700
Re: [newbie] String to binary conversion Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-08-07 02:01 +0000
Re: [newbie] String to binary conversion 88888 Dihedral <dihedral88888@googlemail.com> - 2012-08-07 13:17 -0700
csiph-web