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

def ExecuteLineRemote(self, line, expectedOutputLines=1):

    result = self.ExecuteLine(line)
    if ('' != result):
        return result
    for i in xrange(expectedOutputLines):
        output = self.EatToMarker('\r\n')
        if (output == ''):
            raise AssertionError, ('ExecuteLineRemote    failed.    Returned    empty    after    %s.    Error    is    %s' % (result, self.ReadError()))
        result += output
    return result[0:(-2)]
