def normalizeName(name):
 if isinstance(name, unicode):
  joiner = u'%s %s'
 else:
  joiner = '%s %s'
 sname = name.split(', ')
 if (len(sname) == 2):
  name = (joiner % (sname[1], sname[0]))
 return name

def normalizeName ( name ) : if isinstance ( name , unicode ) : joiner = u'%s %s' else : joiner = '%s %s' sname = name . split ( ', ' ) if ( len ( sname ) == 2 ) : name = ( joiner % ( sname [ 1 ] , sname [ 0 ] ) ) return name
return a name in the normal "name surname" format .