def break_args_options(line):
 tokens = line.split(' ')
 args = []
 options = tokens[:]
 for token in tokens:
  if (token.startswith('-') or token.startswith('--')):
   break
  else:
   args.append(token)
   options.pop(0)
 return (' '.join(args), ' '.join(options))

def break_args_options ( line ) : tokens = line . split ( ' ' ) args = [ ] options = tokens [ : ] for token in tokens : if ( token . startswith ( '-' ) or token . startswith ( '--' ) ) : break else : args . append ( token ) options . pop ( 0 ) return ( ' ' . join ( args ) , ' ' . join ( options ) )
break up the line into an args and options string .