def printTranslatedMemory(four_hex_uints): """ We expect to get the string as four hex units. eg: 0x147d54db 0xc34b3f1b 0x714f989b 0x0a892fd2 Which will be translated to: db547d14-1b3f4bc3-9b984f71-d22f890a """ uuid = UUID() uuid.setFromMemoryDump(four_hex_uints) print uuid.toString()