def __init__(self, logins, ins=sys.stdin, out=None): """ logins is a list of (user, password)==> [("lasote", "mypass"), ("other", "otherpass")] will return sequentially """ self.logins = logins self.login_index = 0 UserIO.__init__(self, ins, out)
def __init__(self, logins, ins=sys.stdin, out=None): """ logins is a dict of {remote: list(user, password)} will return sequentially """ assert isinstance(logins, dict) self.logins = logins self.login_index = Counter() UserIO.__init__(self, ins, out)
def __init__(self, answer, ins=sys.stdin, out=None): self.answer = answer UserIO.__init__(self, ins, out)