def flagsplit(s):
 if ((s[0] != '(') or (s[(-1)] != ')')):
  raise ValueError(("Passed s '%s' is not a flag list" % s))
 return imapsplit(s[1:(-1)])

def flagsplit ( s ) : if ( ( s [ 0 ] != '(' ) or ( s [ ( - 1 ) ] != ')' ) ) : raise ValueError ( ( "Passed s '%s' is not a flag list" % s ) ) return imapsplit ( s [ 1 : ( - 1 ) ] )
converts a string of imap flags to a list :returns: e .