'Login, default anonymous.'

def login(self, user='', passwd='', acct=''):

    if (not user):
        user = 'anonymous'
    if (not passwd):
        passwd = ''
    if (not acct):
        acct = ''
    if ((user == 'anonymous') and (passwd in {'', '-'})):
        passwd = (passwd + 'anonymous@')
    resp = self.sendcmd(('USER    ' + user))
    if (resp[0] == '3'):
        resp = self.sendcmd(('PASS    ' + passwd))
    if (resp[0] == '3'):
        resp = self.sendcmd(('ACCT    ' + acct))
    if (resp[0] != '2'):
        raise error_reply(resp)
    return resp
