parameters: (self, dirname)
return_statement: return self.voidcmd(cmd)
docstring: Change to a directory.
docstring_summary: Change to a directory.
docstring_tokens: Change to a directory .
function: 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)
function_tokens: 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 )