def _escape_split(sep, argstr):
 escaped_sep = ('\\%s' % sep)
 if (escaped_sep not in argstr):
  return argstr.split(sep)
 (before, _, after) = argstr.partition(escaped_sep)
 startlist = before.split(sep)
 unfinished = startlist[(-1)]
 startlist = startlist[:(-1)]
 endlist = _escape_split(sep, after)
 unfinished += (sep + endlist[0])
 return ((startlist + [unfinished]) + endlist[1:])

def _escape_split ( sep , argstr ) : escaped_sep = ( '\\%s' % sep ) if ( escaped_sep not in argstr ) : return argstr . split ( sep ) ( before , _ , after ) = argstr . partition ( escaped_sep ) startlist = before . split ( sep ) unfinished = startlist [ ( - 1 ) ] startlist = startlist [ : ( - 1 ) ] endlist = _escape_split ( sep , after ) unfinished += ( sep + endlist [ 0 ] ) return ( ( startlist + [ unfinished ] ) + endlist [ 1 : ] )
allows for escaping of the separator: e .