

def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator=']', delay_factor=0.5):
    '\n        Sets self.base_prompt\n\n        Used as delimiter for stripping of trailing prompt in output.\n\n        Should be set to something that is general and applies in multiple contexts. For Comware\n        this will be the router prompt with < > or [ ] stripped off.\n\n        This will be set on logging in, but not when entering system-view\n        '
    debug = False
    if debug:
        print('In set_base_prompt')
    delay_factor = self.select_delay_factor(delay_factor)
    self.clear_buffer()
    self.remote_conn.sendall('\n')
    time.sleep((1 * delay_factor))
    prompt = self.remote_conn.recv(MAX_BUFFER).decode('utf-8', 'ignore')
    prompt = self.normalize_linefeeds(prompt)
    prompt = prompt.split('\n')[(- 1)]
    prompt = prompt.strip()
    if (not (prompt[(- 1)] in (pri_prompt_terminator, alt_prompt_terminator))):
        raise ValueError('Router prompt not found: {0}'.format(prompt))
    prompt = prompt[1:(- 1)]
    prompt = prompt.strip()
    self.base_prompt = prompt
    if debug:
        print('prompt: {}'.format(self.base_prompt))
    return self.base_prompt

dataset/ETHPy150Open ktbyers/netmiko/netmiko/hp/hp_comware_ssh.py HPComwareSSH.set_base_prompt/original