Open file list management dialog box
771967
def open_fileswitcher_dlg(self):
        """"""
        if not self.tabs.count():
            return
        if self.fileswitcher_dlg is not None and \
          self.fileswitcher_dlg.is_visible:
            self.fileswitcher_dlg.hide()
            self.fileswitcher_dlg.is_visible = False
            return
        self.fileswitcher_dlg = FileSwitcher(self, self, self.tabs, self.data,
                                             ima.icon('TextFileIcon'))
        self.fileswitcher_dlg.sig_goto_file.connect(self.set_stack_index)
        self.fileswitcher_dlg.show()
        self.fileswitcher_dlg.is_visible = True
945091
def askForFolder(parent, msg = None):
    '''
    
    '''
    msg = msg or 'Select folder'
    caller = _callerName().split(".")
    name = "/".join([LAST_PATH, caller[-1]])
    namespace = caller[0]
    path = pluginSetting(name, namespace)
    folder =  QtWidgets.QFileDialog.getExistingDirectory(parent, msg, path)
    if folder:
        setPluginSetting(name, folder, namespace)
    return folder
416199
def files_list(self, **kwargs) -> SlackResponse:
        """"""
        self._validate_xoxp_token()
        return self.api_call("files.list", http_verb="GET", params=kwargs)
529670
@Override
    public File showDialog(WindowBasedTextGUI textGUI) {
        selectedFile = null;
        super.showDialog(textGUI);
        return selectedFile;
    }
565628
def browse_dialog_file():
    
    logger_directory.info("enter browse_dialog")

    # We make files a list, because the user can multi-select files.
    _files = []
    _path = ""
    try:
        _go_to_package()
        _path_bytes = subprocess.check_output(['python', 'gui_file_browse.py'])
        _path = _fix_path_bytes(_path_bytes)
        _files = [i for i in _path]
        _path = os.path.dirname(_path[0])
        logger_directory.info("chosen path: {}, chosen file: {}".format(_path, _files))

    except IndexError:
        logger_directory.warn("directory: browse_dialog_file: IndexError: no file chosen")
    except Exception as e:
        logger_directory.error("directory: browse_dialog_file: UnknownError: {}".format(e))

    logger_directory.info("exit browse_dialog_file")

    return _path, _files
380913
function _listbox()
{
  at.write(VT_SAVE_CURSOR); // save

  at.write(CSI + (LAST + 2) + ';' + (AGAIN - 2) + 'r');
  at.moveto(1, LAST + 2);
  //at.write(CSI + 'J'); // erase down

  KEYS.forEach(function(line, idx) {
    if (selected === idx) at.reverse();
    var ll = line.substr(0, process.stdout.columns - 2);
    at.write(CSI + '4G' + ll + ESC + 'D');
    if (selected === idx) at.reset();
  });

  _resetscroll();
  at.write(VT_RESTORE_CURSOR); // restore
  at.reset();
}
534381
def AskFileForOpen(message=None, typeList=None, version=None, defaultLocation=None, dialogOptionFlags=None, location=None, clientName=None, windowTitle=None, actionButtonLabel=None, cancelButtonLabel=None, preferenceKey=None, popupExtension=None, eventProc=None, previewProc=None, filterProc=None, wanted=None, multiple=None):
    """"""
    return psidialogs.ask_file(message=message)
957052
def askopenfile(mode="r", **options):
    ""

    filename = askopenfilename(**options)
    if filename:
        return open(filename, mode)
    return None
528959
function openDialog(files, config, handleInsert) {
  uploadcare.openDialog(files, config).done(({ promise }) =>
    promise().then(({ cdnUrl, count }) => {
      if (config.multiple) {
        const urls = Array.from({ length: count }, (val, idx) => `${cdnUrl}nth/${idx}/`);
        handleInsert(urls);
      } else {
        handleInsert(cdnUrl);
      }
    }),
  );
}
96860
def create_folder_manage_actions(self, fnames):
        """"""
        actions = []
        if os.name == 'nt':
            _title = _("Open command prompt here")
        else:
            _title = _("Open terminal here")
        _title = _("Open IPython console here")
        action = create_action(self, _title,
                               triggered=lambda:
                               self.open_interpreter(fnames))
        actions.append(action)
        return actions
380908
def askopenfiles(mode="r", **options):
    

    files = askopenfilenames(**options)
    if files:
        ofiles = []
        for filename in files:
            ofiles.append(open(filename, mode))
        files = ofiles
    return files
815082
def confirm_value(self, widget):
        
        self.hide()
        params = (self.fileFolderNavigator.get_selection_list(),)
        return params
261680
def browse( parent, filename = '' ):
        
        dlg = XdkWindow(parent)
        dlg.show()
        
        if ( filename ):
            dlg.loadFilename(filename)
882676
def create_toolbar(MAIN):
    """"""
    actions = MAIN.action

    toolbar = MAIN.addToolBar('File Management')
    toolbar.setObjectName('File Management')  # for savestate
    toolbar.addAction(MAIN.info.action['open_dataset'])
    toolbar.addSeparator()
    toolbar.addAction(MAIN.channels.action['load_channels'])
    toolbar.addAction(MAIN.channels.action['save_channels'])
    toolbar.addSeparator()
    toolbar.addAction(MAIN.notes.action['new_annot'])
    toolbar.addAction(MAIN.notes.action['load_annot'])

    """ ------ SCROLL ------ """
    actions = MAIN.traces.action

    toolbar = MAIN.addToolBar('Scroll')
    toolbar.setObjectName('Scroll')  # for savestate
    toolbar.addAction(actions['step_prev'])
    toolbar.addAction(actions['step_next'])
    toolbar.addAction(actions['page_prev'])
    toolbar.addAction(actions['page_next'])
    toolbar.addSeparator()
    toolbar.addAction(actions['X_more'])
    toolbar.addAction(actions['X_less'])
    toolbar.addSeparator()
    toolbar.addAction(actions['Y_less'])
    toolbar.addAction(actions['Y_more'])
    toolbar.addAction(actions['Y_wider'])
    toolbar.addAction(actions['Y_tighter'])

    """ ------ ANNOTATIONS ------ """
    actions = MAIN.notes.action

    toolbar = MAIN.addToolBar('Annotations')
    toolbar.setObjectName('Annotations')

    toolbar.addAction(actions['new_bookmark'])
    toolbar.addSeparator()
    toolbar.addAction(actions['new_event'])
    toolbar.addWidget(MAIN.notes.idx_eventtype)
    toolbar.addSeparator()
    toolbar.addWidget(MAIN.notes.idx_stage)
    toolbar.addWidget(MAIN.notes.idx_quality)
546604
def create_file_manage_actions(self, fnames):
        """"""
        only_files = all([osp.isfile(_fn) for _fn in fnames])
        only_modules = all([osp.splitext(_fn)[1] in ('.py', '.pyw', '.ipy')
                            for _fn in fnames])
        only_notebooks = all([osp.splitext(_fn)[1] == '.ipynb'
                              for _fn in fnames])
        only_valid = all([encoding.is_text_file(_fn) for _fn in fnames])
        run_action = create_action(self, _("Run"), icon=ima.icon('run'),
                                   triggered=self.run)
        edit_action = create_action(self, _("Edit"), icon=ima.icon('edit'),
                                    triggered=self.clicked)
        move_action = create_action(self, _("Move..."),
                                    icon="move.png",
                                    triggered=self.move)
        delete_action = create_action(self, _("Delete..."),
                                      icon=ima.icon('editdelete'),
                                      triggered=self.delete)
        rename_action = create_action(self, _("Rename..."),
                                      icon=ima.icon('rename'),
                                      triggered=self.rename)
        open_external_action = create_action(self, _("Open With OS"), 
                                             triggered=self.open_external)
        ipynb_convert_action = create_action(self, _("Convert to Python script"),
                                             icon=ima.icon('python'),
                                             triggered=self.convert_notebooks)
        copy_file_clipboard_action = (
            create_action(self, _("Copy"),
                          QKeySequence(get_shortcut('explorer', 'copy file')),
                          icon=ima.icon('editcopy'),
                          triggered=self.copy_file_clipboard))
        save_file_clipboard_action = (
            create_action(self, _("Paste"),
                          QKeySequence(get_shortcut('explorer', 'paste file')),
                          icon=ima.icon('editpaste'),
                          triggered=self.save_file_clipboard))
        copy_absolute_path_action = (
            create_action(self, _("Copy Absolute Path"), QKeySequence(
                get_shortcut('explorer', 'copy absolute path')),
                          triggered=self.copy_absolute_path))
        copy_relative_path_action = (
            create_action(self, _("Copy Relative Path"), QKeySequence(
                get_shortcut('explorer', 'copy relative path')),
                          triggered=self.copy_relative_path))
        
        actions = []
        if only_modules:
            actions.append(run_action)
        if only_valid and only_files:
            actions.append(edit_action)
        
        if sys.platform == 'darwin':
            text=_("Show in Finder")
        else:
            text=_("Show in Folder")
        external_fileexp_action = create_action(self, text, 
                                triggered=self.show_in_external_file_explorer)        
        actions += [delete_action, rename_action]
        basedir = fixpath(osp.dirname(fnames[0]))
        if all([fixpath(osp.dirname(_fn)) == basedir for _fn in fnames]):
            actions.append(move_action)
        actions += [None]
        actions += [copy_file_clipboard_action, save_file_clipboard_action,
                    copy_absolute_path_action, copy_relative_path_action]
        if not QApplication.clipboard().mimeData().hasUrls():
            save_file_clipboard_action.setDisabled(True)
        actions += [None]
        if only_files:
            actions.append(open_external_action)
        actions.append(external_fileexp_action)
        actions.append([None])
        if only_notebooks and nbexporter is not None:
            actions.append(ipynb_convert_action)

        # VCS support is quite limited for now, so we are enabling the VCS
        # related actions only when a single file/folder is selected:
        dirname = fnames[0] if osp.isdir(fnames[0]) else osp.dirname(fnames[0])
        if len(fnames) == 1 and vcs.is_vcs_repository(dirname):
            commit_slot = lambda : self.vcs_command([dirname], 'commit')
            browse_slot = lambda : self.vcs_command([dirname], 'browse')
            vcs_ci = create_action(self, _("Commit"),
                                   icon=ima.icon('vcs_commit'),
                                   triggered=commit_slot)
            vcs_log = create_action(self, _("Browse repository"),
                                    icon=ima.icon('vcs_browse'),
                                    triggered=browse_slot)
            actions += [None, vcs_ci, vcs_log]

        return actions
164400
def list_archive(archive, verbosity=1, program=None, interactive=True):
    """"""
    # Set default verbosity to 1 since the listing output should be visible.
    util.check_existing_filename(archive)
    if verbosity >= 0:
        util.log_info("Listing %s ..." % archive)
    return _handle_archive(archive, 'list', verbosity=verbosity,
      interactive=interactive, program=program)
284003
def _file_list(self, folder):
        ''''''
        rtn = []
        walk = self._walk_report(folder)
        for key,val in walk.items():
            for v in val:
                x=os.path.join(key,v)
                rtn.append(x)

        self.file_count = len(rtn)  #a count of the files we'll have in the final cleaned sosreport, for reporting
        return rtn