hexstring to string?
maximilianscherr
MaximilianScherr at T-Online.de
Thu Mar 7 12:32:25 EST 2002
More information about the Python-list mailing list
Thu Mar 7 12:32:25 EST 2002
- Previous message (by thread): hexstring to string?
- Next message (by thread): hexstring to string?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
i made a function to convert a hex string containing character to a
normal string.
it looks like this:
class ConversionHandler:
def ConvertHexToStr(self, hex):
letter = 0
str = ''
while len(str) < len(hex) / 2:
nextletter = letter + 2
str = str + chr(int(hex[letter:nextletter], 16))
letter = nextletter
return str
hex looks like: 414243
but why does it not work?
- Previous message (by thread): hexstring to string?
- Next message (by thread): hexstring to string?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list