def choose_dir(self, *args): ''' create filemanager and open in user's home directory ''' fm = MDFileManager() fm.exit_manager = partial(self.exit_filemanager, fm) fm.select_path = partial(self.handle_selection, fm) fm.show(str(Path.home()))
def __filechooser_pressed(name, spec, changed, initpath, *args): fm = MDFileManager() fm.exit_manager = partial(exit_filemanager, fm) fm.select_path = partial(handle_selection, name, changed, spec, fm) if initpath is None: initpath = str(Path.home()) fm.show(initpath)