b2a_hex (data) or hexlify (data) funtionality in V1.5.2

Beat Bolli beat.bolli at dware.ch
Tue Sep 19 09:53:56 EDT 2000


> Is there any way I can make, export, simulate, make or .. this function
> in Python 1.5.2.

import string

def hexify(s):
    return string.join(map(lambda c: ('00' + hex(ord(c))[2:])[-2:], s), '')

Beat Bolli
--
dware design & software GmbH
Mattenstrasse 11, CH-2555 Brügg b. Biel
Telefon: +41 (32) 374 27 00, Telefax: +41 (32) 374 27 01
E-Mail: beat.bolli at dware.ch





More information about the Python-list mailing list