def parse_command_args(args):
    '\n    This parses the arguments and returns a tuple containing:\n\n    (args, command, command_args)\n\n    For example, "--config=bar start --with=baz" would return:\n\n    ([\'--config=bar\'], \'start\', [\'--with=baz\'])\n    '
    index = None
    for (arg_i, arg) in enumerate(args):
        if (not arg.startswith('-')):
            index = arg_i
            break
    if (index is None):
        return (args, None, [])
    return (args[:index], args[index], args[(index + 1):])
This parses the arguments and returns a tuple containing:

(args, command, command_args)

For example, "--config=bar start --with=baz" would return:

(['--config=bar'], 'start', ['--with=baz'])
def parse_command_args(args):
    '\n    This parses the arguments and returns a tuple containing:\n\n    (args, command, command_args)\n\n    For example, "--config=bar start --with=baz" would return:\n\n    ([\'--config=bar\'], \'start\', [\'--with=baz\'])\n    '
    index = None
    for (arg_i, arg) in enumerate(args):
        if (not arg.startswith('-')):
            index = arg_i
            break
    if (index is None):
        return (args, None, [])
    return (args[:index], args[index], args[(index + 1):])