Kent Johnson wrote: > >>> import re > >>> def hexify(match): > ... return '%%%X' % ord(match.group(0)) Ah, should be '%%%02X' ... Kent