code: def select_location(self):
          
          location = osp.normpath(getexistingdirectory(self,
                                                       _("Select directory"),
                                                       self.location))
  
          if location:
              if is_writable(location):
                  self.location = location
                  self.update_location()
docs: Select directory.