def makeSplitter(lstrip=None, sep='|', comments=True, origNotesSep=' (', newNotesSep='::(', strip=None):
 def splitter(x):
  if (not x):
   return x
  x = x.strip()
  if (not x):
   return x
  if (lstrip is not None):
   x = x.lstrip(lstrip).lstrip()
  lx = x.split(sep)
  lx[:] = filter(None, [j.strip() for j in lx])
  if comments:
   lx[:] = [j.replace(origNotesSep, newNotesSep, 1) for j in lx]
  if strip:
   lx[:] = [j.strip(strip) for j in lx]
  return lx
 return splitter

def makeSplitter ( lstrip = None , sep = '|' , comments = True , origNotesSep = ' (' , newNotesSep = '::(' , strip = None ) : def splitter ( x ) : if ( not x ) : return x x = x . strip ( ) if ( not x ) : return x if ( lstrip is not None ) : x = x . lstrip ( lstrip ) . lstrip ( ) lx = x . split ( sep ) lx [ : ] = filter ( None , [ j . strip ( ) for j in lx ] ) if comments : lx [ : ] = [ j . replace ( origNotesSep , newNotesSep , 1 ) for j in lx ] if strip : lx [ : ] = [ j . strip ( strip ) for j in lx ] return lx return splitter
return a splitter function suitable for a given set of data .