binary encoded hexadecimal

Kapil Thangavelu kthangavelu at earthlink.net
Mon Aug 21 01:41:02 EDT 2000


i'm trying to create a binary encoded (c struct) hexadecimal string.
basically implementing the functionality of perl's

pack('H*', $my_hexadecimal_string);

which will take a list of values and convert it into a binary structure
and return the string containing the structure. in this case a
hexadecimal string, high nybble first.

any ideas?? i've taken a look at the struct module which does the binary
encoding of strings but it doesn't implement hexadecimal encoding.
should i extend the module's functionality in c? i've also looked at
binhex but i get the impression that this isn't what i'm looking for. 

any help or pointers appreciated.

Thanks

Kapil



More information about the Python-list mailing list