def run_conda_command(command, prefix, *arguments):
 (p, sub_parsers) = generate_parser()
 assert (command in parser_config), 'Wrong command for conda {0}'.format(command)
 parser_config[command](sub_parsers)
 prefix = escape_for_winpath(prefix)
 if arguments:
  arguments = list(map(escape_for_winpath, arguments))
 if (command is Commands.INFO):
  command_line = '{0} {1}'.format(command, ' '.join(arguments))
 elif (command is Commands.LIST):
  command_line = '{0} -n {1} {2}'.format(command, prefix, ' '.join(arguments))
 else:
  command_line = '{0} -y -q -n {1} {2}'.format(command, prefix, ' '.join(arguments))
 args = p.parse_args(split(command_line))
 context._set_argparse_args(args)
 with captured() as c:
  args.func(args, p)
 return (c.stdout, c.stderr)

def run_conda_command ( command , prefix , * arguments ) : ( p , sub_parsers ) = generate_parser ( ) assert ( command in parser_config ) , 'Wrong command for conda {0}' . format ( command ) parser_config [ command ] ( sub_parsers ) prefix = escape_for_winpath ( prefix ) if arguments : arguments = list ( map ( escape_for_winpath , arguments ) ) if ( command is Commands . INFO ) : command_line = '{0} {1}' . format ( command , ' ' . join ( arguments ) ) elif ( command is Commands . LIST ) : command_line = '{0} -n {1} {2}' . format ( command , prefix , ' ' . join ( arguments ) ) else : command_line = '{0} -y -q -n {1} {2}' . format ( command , prefix , ' ' . join ( arguments ) ) args = p . parse_args ( split ( command_line ) ) context . _set_argparse_args ( args ) with captured ( ) as c : args . func ( args , p ) return ( c . stdout , c . stderr )
run conda command .