def simple_split(s, keep=False, maxsplit=None):
 whitespace = '\n DCTB  '
 if (maxsplit == 0):
  if keep:
   return [s]
  else:
   return [s.strip(whitespace)]
 elif (maxsplit is None):
  maxsplit = 0
 if keep:
  pattern = (('([' + whitespace) + '])')
  parts = re.split(pattern, s, maxsplit)
  return _combine_ws(parts, whitespace)
 else:
  pattern = (('[' + whitespace) + ']')
  parts = re.split(pattern, s, maxsplit)
  parts[(-1)] = parts[(-1)].rstrip()
  return [p for p in parts if p]

def simple_split ( s , keep = False , maxsplit = None ) : whitespace = '\n DCTB  ' if ( maxsplit == 0 ) : if keep : return [ s ] else : return [ s . strip ( whitespace ) ] elif ( maxsplit is None ) : maxsplit = 0 if keep : pattern = ( ( '([' + whitespace ) + '])' ) parts = re . split ( pattern , s , maxsplit ) return _combine_ws ( parts , whitespace ) else : pattern = ( ( '[' + whitespace ) + ']' ) parts = re . split ( pattern , s , maxsplit ) parts [ ( - 1 ) ] = parts [ ( - 1 ) ] . rstrip ( ) return [ p for p in parts if p ]
split a string on whitespace .