Reverse of hex()
Gaetan Corneau
corg at copernic.com
Tue Mar 21 09:09:25 EST 2000
Hans,
> You can use eval:
>
> >>> eval('0xf')
> 15
That's what I did while waiting for a "better" answer :)
> Or maybe:
>
> >>> string.atoi('0xf', 16)
> 15
I prefer that.
Thanks!
______________________________________________________
Gaetan Corneau
Software Developer
Copernic Technologies inc.
http://www.copernic.com
E-mail: corg at copernic.com
______________________________________________________
"Tu l'as trop écrasé, César, ce Port Salut"
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/B/MU d- s+:++ a C++
UL+ P--- W+ N- K- W++ t--
!5 X- R+ tv-- b++ DI++
G e++ h---- r+++ y++++
------END GEEK CODE BLOCK------
More information about the Python-list
mailing list