def uuid_bin_to_str(uuid):
 (block1, block2, block3) = struct.unpack('<LHH', uuid[:8])
 (block4, block5, block6) = struct.unpack('>HHL', uuid[8:16])
 return ('%08x-%04x-%04x-%04x-%04x%08x' % (block1, block2, block3, block4, block5, block6))

def uuid_bin_to_str ( uuid ) : ( block1 , block2 , block3 ) = struct . unpack ( '<LHH' , uuid [ : 8 ] ) ( block4 , block5 , block6 ) = struct . unpack ( '>HHL' , uuid [ 8 : 16 ] ) return ( '%08x-%04x-%04x-%04x-%04x%08x' % ( block1 , block2 , block3 , block4 , block5 , block6 ) )
convert a binary uuid to human readable string .