'Sets self.base_prompt
Used as delimiter for stripping of trailing prompt in output.
Should be set to something that is general and applies in multiple contexts. For Comware
this will be the router prompt with < > or [ ] stripped off.
This will be set on logging in, but not when entering system-view'

def set_base_prompt(self, pri_prompt_terminator=u'>', alt_prompt_terminator=u']', delay_factor=1):

    log.debug(u'In    set_base_prompt')
    delay_factor = self.select_delay_factor(delay_factor)
    self.clear_buffer()
    self.write_channel(u'\n')
    time.sleep((0.5 * delay_factor))
    prompt = self.read_channel()
    prompt = self.normalize_linefeeds(prompt)
    prompt = prompt.split(u'\n')[(-1)]
    prompt = prompt.strip()
    if (not (prompt[(-1)] in (pri_prompt_terminator, alt_prompt_terminator))):
        raise ValueError(u'Router    prompt    not    found:    {0}'.format(prompt))
    prompt = re.sub(u'^HRP_.', u'', prompt, flags=re.M)
    prompt = prompt[1:(-1)]
    prompt = prompt.strip()
    self.base_prompt = prompt
    log.debug(u'prompt:    {0}'.format(self.base_prompt))
    return self.base_prompt
