def parse_alignment(a):
'''handle alignment attribute. TODO: handle all valid types'''
if a=='left':
return ui.ALIGN_LEFT
elif a=='right':
return ui.ALIGN_RIGHT
elif a=='center':
return ui.ALIGN_CENTER
else: #fixme... handle all types.
print 'unhandled alignment',a
return ui.ALIGN_LEFT
评论列表
文章目录