def tuple_to_list(t):
	""" Convert a markup tuple:
			(text,[(color,pos),...])
		To a markup list:
			[(color,textpart),...]
		This is the opposite to urwid.util.decompose_tagmarkup
	"""
	(text,attrs) = t
	pc = 0
	l = []

	for (attr,pos) in attrs:
		if attr == None:
			l.append(text[pc:pc+pos])

		else:
			l.append((attr, text[pc:pc+pos]))
		pc += pos

	return l