[python-win32] character to integer

2005-04-04 Thread Chi Tai
Hello, how can i make an integer value from a character value like this. string = Hallo integerval = string[0] i = integerval + 2 #this does not work because integerval is not an integer value i want the in integervalue the intvalue of the hexvalue 0x48 ( the character-value of H) Is there a

Re: [python-win32] character to integer

2005-04-04 Thread Simon Dahlbacka
help(ord) On Apr 4, 2005 4:16 PM, Chi Tai [EMAIL PROTECTED] wrote: Hello, how can i make an integer value from a character value like this. string = Hallo integerval = string[0] i = integerval + 2 #this does not work because integerval is not an integer value i want the in

Re: [python-win32] character to integer

2005-04-04 Thread Daniel F
function ord() would get the int value of the char. and in case you want to convert back after playing with the number, function chr() does the trick ord('a') 97 chr(97) 'a' chr(ord('a') + 3) 'd' On Apr 4, 2005 9:16 AM, Chi Tai [EMAIL PROTECTED] wrote: Hello, how can i make an integer