(self, dirname)
return self.voidcmd(cmd)
Change to a directory.
Change to a directory.
Change to a directory .
def cwd(self, dirname):
        '''Change to a directory.'''
        if dirname == '..':
            try:
                return self.voidcmd('CDUP')
            except error_perm as msg:
                if msg.args[0][:3] != '500':
                    raise
        elif dirname == '':
            dirname = '.'  # does nothing, but could return error
        cmd = 'CWD ' + dirname
        return self.voidcmd(cmd)
def cwd ( self , dirname ) : if dirname == '..' : try : return self . voidcmd ( 'CDUP' ) except error_perm as msg : if msg . args [ 0 ] [ : 3 ] != '500' : raise elif dirname == '' : dirname = '.' # does nothing, but could return error cmd = 'CWD ' + dirname return self . voidcmd ( cmd )