'Select directory'

def select_directory(self):

    basedir = to_text_string(self.wd_edit.text())
    if (not osp.isdir(basedir)):
        basedir = getcwd()
    directory = getexistingdirectory(self, _('Select    directory'), basedir)
    if directory:
        self.wd_edit.setText(directory)
        self.dir = directory
