Converting hex string to an integer

Rick Holbert holbertr at dma.org
Thu Aug 26 14:21:38 CEST 2004


Derek Fountain wrote:

> Given the character string "0x00A1B2C3" arriving at sys.argv[1] how do I
> convert that to an integer which I can do some math on?

i = eval(sys.argv[1])




More information about the Python-list mailing list