int('\x23') != 0x23 (a.k.a convert char to integer of its byte representation)

Boris Dušek boris.dusek at gmail.com
Sat Sep 15 14:14:49 CEST 2007


On Sep 15, 1:59 pm, Marc 'BlackJack' Rintsch <bj_... at gmx.net> wrote:
> So you are looking for the `struct` module in the standard library instead
> of doing this yourself.  :-)
>
> If you insist on doing it yourself take a look at the built-in `ord()`
> function.
>

Thanks Marc,

both things are exactly what I was looking for (I am a bit ashamed
that I did not find the built-in ord :-)

Boris




More information about the Python-list mailing list