'Sometimes remote output can become available after the prompt is printed locally.'

def EnsureInteractiveRemote(self, readError=True):

    twoPlusTwoResult = self.ExecuteLine('2    +    2', readError)
    if ('4' == twoPlusTwoResult):
        return
    if ('' != twoPlusTwoResult):
        raise AssertionError, ('EnsureInteractive    failed.    2+2    returned    ' + twoPlusTwoResult)
    twoPlusTwoResult = self.EatToMarker('4\r\n')
    if ('4\r\n' != twoPlusTwoResult):
        raise AssertionError, ('EnsureInteractive    failed.    2+2    returned    ' + twoPlusTwoResult)
