convert assembly data (double words and bytes) in two tupple

joblack tobias.koeck at gmail.com
Tue Dec 7 21:36:25 EST 2010


I have two assembly data txt files, one has the structure:

0E1459D1Fh, 0AB58FAAEh, 4303E35Bh, 55FA3020h, 0E66D76ADh,
0EF434544h, ...

and the other has the structure:

53h, 6, 6Bh, 0D4h, 40h, 35h, 0B5h, 33h, 0AFh, 30h, 0B3h,
66h, ...

(I removed the dd and db with awk)

Now I want both of them in a tupple (like map1 = ( ... ) and map2 =
( ...) in my source code so I can index them..

Any idea how to give python a hint that the h at the end of the number
means it's a hex number? Or do I have to torture myself with regex to
get it right?



More information about the Python-list mailing list