(diclist, wl=[], bl=[])
return res
this function takes a list a dictionaries to display in columns. Dictionnaries keys are the columns names.
			All dictionaries must have the same keys.
			wl is a whitelist of column names to display
			bl is a blacklist of columns names to hide
this function takes a list a dictionaries to display in columns. Dictionnaries keys are the columns names.
			All dictionaries must have the same keys.
			wl is a whitelist of column names to display
			bl is a blacklist of columns names to hide
this function takes a list a dictionaries to display in columns . Dictionnaries keys are the columns names . All dictionaries must have the same keys . wl is a whitelist of column names to display bl is a blacklist of columns names to hide
def table_format(diclist, wl=[], bl=[]):
		""" 
			this function takes a list a dictionaries to display in columns. Dictionnaries keys are the columns names.
			All dictionaries must have the same keys.
			wl is a whitelist of column names to display
			bl is a blacklist of columns names to hide
		"""
		res=""
		if diclist:
			diclist=obj2utf8(diclist)
			keys=[x for x in diclist[0].iterkeys()]
			if wl:
				keys=[x for x in wl if x in keys]
			if bl:
				keys=[x for x in keys if x not in bl]
			titlesdic={}
			for k in keys:
				titlesdic[k]=k
			diclist.insert(0,titlesdic)
			colsize=get_columns_size(diclist)
			i=0
			for c in diclist:
				if i==1:
					res+="-"*sum([k+2 for k in [y for x,y in colsize.iteritems() if x in titlesdic]])+"\n"
				i+=1
				for name in keys:
					if c[name] is not unicode:
						value=str(c[name]).strip()
					else:
						value=c[name].strip()
					utf8align=len(value)-len(value.decode('utf8',errors='replace'))
					res+=value.ljust(colsize[name]+2+utf8align)
				res+="\n"
		return res
def table_format ( diclist , wl = [ ] , bl = [ ] ) : res = "" if diclist : diclist = obj2utf8 ( diclist ) keys = [ x for x in diclist [ 0 ] . iterkeys ( ) ] if wl : keys = [ x for x in wl if x in keys ] if bl : keys = [ x for x in keys if x not in bl ] titlesdic = { } for k in keys : titlesdic [ k ] = k diclist . insert ( 0 , titlesdic ) colsize = get_columns_size ( diclist ) i = 0 for c in diclist : if i == 1 : res += "-" * sum ( [ k + 2 for k in [ y for x , y in colsize . iteritems ( ) if x in titlesdic ] ] ) + "\n" i += 1 for name in keys : if c [ name ] is not unicode : value = str ( c [ name ] ) . strip ( ) else : value = c [ name ] . strip ( ) utf8align = len ( value ) - len ( value . decode ( 'utf8' , errors = 'replace' ) ) res += value . ljust ( colsize [ name ] + 2 + utf8align ) res += "\n" return res