'Set the prompt for the current context.  Append the name of
the current plugin to the prompt'

def setprompt(self, prompt=None):

    if (prompt is None):
        if (self.getcontext().get_name() == self.defaultcontext.get_name()):
            context = '    '
        else:
            context = (PROMPT_FMTSTR % (self.getcontext().get_type(), self.getcontext().get_name()))
        prompt = ((self.promptpre + context) + PROMPT_POST)
    self.prompt = prompt
