Open the currently selected shot in the filebrowser

        :returns: None
        :rtype: None
        :raises: None
196956
def open_shot_path(self, *args, **kwargs):
        
        f = self.shot_path_le.text()
        d = os.path.dirname(f)
        osinter = get_interface()
        osinter.open_path(d)
1225533
def u2opener(self):
        
        if self.urlopener is None:
            return urllib2.build_opener(*self.u2handlers())
        return self.urlopener
1251724
def open(self):
        """"""
        filename = self.dialogs.getOpenFileName(filter="*.%s" % self.FTYPE)
        if filename:
            self.new(filename)
242945
def shot_save_callback(self, *args, **kwargs):
        
        tasksel = self.browser.shotbrws.selected_indexes(2)
        if not tasksel or not tasksel[0].isValid():
            self.statusbar.showMessage('No task selected! Cannot save!')
            return

        taskitem = tasksel[0].internalPointer()
        task = taskitem.internal_data()
        rtype = djadapter.RELEASETYPES['work']
        descriptor = self.shot_descriptor_le.text()
        if not self.check_selection_for_save(task, rtype, descriptor):
            return

        tfi = TaskFileInfo.get_next(task=task, releasetype=rtype,
                                    typ=self._filetype, descriptor=descriptor)
        self._save_tfi(tfi)
681398
def open_file(self, file):
        
        files = self.get_recent_files()
        try:
            files.remove(file)
        except ValueError:
            pass
        files.insert(0, file)
        # discard old files
        del files[self.max_recent_files:]
        self.set_value('list', files)
        self.updated.emit()
403385
def view_shot(self, shot):
        
        log.debug('Viewing shot %s', shot.name)
        self.cur_shot = None
        self.pages_tabw.setCurrentIndex(3)
        self.shot_name_le.setText(shot.name)
        self.shot_prj_le.setText(shot.project.name)
        self.shot_seq_le.setText(shot.sequence.name)
        self.shot_start_sb.setValue(shot.startframe)
        self.shot_end_sb.setValue(shot.endframe)
        self.shot_handle_sb.setValue(shot.handlesize)
        self.shot_desc_pte.setPlainText(shot.description)

        assetsrootdata = treemodel.ListItemData(["Name", "Description"])
        assetsrootitem = treemodel.TreeItem(assetsrootdata)
        self.shot_asset_model = treemodel.TreeModel(assetsrootitem)
        self.shot_asset_treev.setModel(self.shot_asset_model)
        atypes = {}
        assets = shot.assets.all()
        for a in assets:
            atype = a.atype
            atypeitem = atypes.get(atype)
            if not atypeitem:
                atypedata = djitemdata.AtypeItemData(atype)
                atypeitem = treemodel.TreeItem(atypedata, assetsrootitem)
                atypes[atype] = atypeitem
            assetdata = djitemdata.AssetItemData(a)
            treemodel.TreeItem(assetdata, atypeitem)

        tasksrootdata = treemodel.ListItemData(["Name", "Short"])
        tasksrootitem = treemodel.TreeItem(tasksrootdata)
        self.shot_task_model = treemodel.TreeModel(tasksrootitem)
        self.shot_task_tablev.setModel(self.shot_task_model)
        tasks = shot.tasks.all()
        for t in tasks:
            tdata = djitemdata.TaskItemData(t)
            treemodel.TreeItem(tdata, tasksrootitem)

        self.cur_shot = shot
1364399
def on_open_output_tool_clicked(self):
        
        output_path = self.output_path.text()
        if not output_path:
            output_path = os.path.expanduser('~')
        # noinspection PyCallByClass,PyTypeChecker
        filename, __ = QFileDialog.getSaveFileName(
            self, tr('Output file'), output_path, tr('Raster file (*.tif)'))
        if filename:
            self.output_path.setText(filename)
30388
def open(self, filehandle):
        """"""
        with self.lock:
            if filehandle in self.files:
                self.files[filehandle] += 1
            elif filehandle.closed:
                filehandle.open()
                self.files[filehandle] = 1
                self.past.append(filehandle)
578485
protected void openFileChooser()
   {
      if (m_model.getShowDialog())
      {
         if (m_fileChooser.showSaveDialog(m_parent) == JFileChooser.APPROVE_OPTION)
         {
            FileNameExtensionFilter filter = (FileNameExtensionFilter) m_fileChooser.getFileFilter();
            String description = filter.getDescription();
            m_model.setType(description.substring(0, description.indexOf(' ')));
            m_model.setFile(null);
            m_model.setFile(m_fileChooser.getSelectedFile());
         }
         m_model.setShowDialog(false);
      }
   }
748366
def preview(self):
        
        win_name = 'Camera'
        cv2.namedWindow(win_name, cv2.WINDOW_AUTOSIZE)
        cv2.moveWindow(win_name,20,20)
        self.open()
        while(self.isOpened()):
            cv2.imshow(win_name,self._stream.read()[1])
            if cv2.waitKey(25) & 0xFF == ord('q'):
                break
        cv2.waitKey()
        cv2.destroyAllWindows()
        cv2.waitKey()
1119213
def open(self, fnames=None):
        """"""
        if fnames is None:
            fnames = self.get_selected_filenames()
        for fname in fnames:
            if osp.isfile(fname) and encoding.is_text_file(fname):
                self.parent_widget.sig_open_file.emit(fname)
            else:
                self.open_outside_spyder([fname])
1299429
def open_file(self, path):
        
        if path:
            editor = self.tabWidget.open_document(path)
            editor.cursorPositionChanged.connect(
                self.on_cursor_pos_changed)
            self.recent_files_manager.open_file(path)
            self.menu_recents.update_actions()
787904
def pfopen(self, event=None):
        

        # Get the selected file name
        fname = self._openMenuChoice.get()

        # Also allow them to simply find any file - do not check _task_name_...
        # (could use tkinter's FileDialog, but this one is prettier)
        if fname[-3:] == '...':
            if capable.OF_TKFD_IN_EPAR:
                fname = askopenfilename(title="Load Config File",
                                        parent=self.top)
            else:
                from . import filedlg
                fd = filedlg.PersistLoadFileDialog(self.top,
                                                   "Load Config File",
                                                   self._getSaveAsFilter())
                if fd.Show() != 1:
                    fd.DialogCleanup()
                    return
                fname = fd.GetFileName()
                fd.DialogCleanup()

        if not fname: return # canceled
        self.debug('Loading from: '+fname)

        # load it into a tmp object (use associatedPkg if we have one)
        try:
            tmpObj = cfgpars.ConfigObjPars(fname, associatedPkg=\
                                           self._taskParsObj.getAssocPkg(),
                                           strict=self._strict)
        except Exception as ex:
            showerror(message=ex.message, title='Error in '+os.path.basename(fname))
            self.debug('Error in '+os.path.basename(fname))
            self.debug(traceback.format_exc())
            return

        # check it to make sure it is a match
        if not self._taskParsObj.isSameTaskAs(tmpObj):
            msg = 'The current task is "'+self._taskParsObj.getName()+ \
                  '", but the selected file is for task "'+ \
                  str(tmpObj.getName())+'".  This file was not loaded.'
            showerror(message=msg, title="Error in "+os.path.basename(fname))
            self.debug(msg)
            self.debug(traceback.format_exc())
            return

        # Set the GUI entries to these values (let the user Save after)
        newParList = tmpObj.getParList()
        try:
            self.setAllEntriesFromParList(newParList, updateModel=True)
                # go ahead and updateModel, even though it will take longer,
                # we need it updated for the copy of the dict we make below
        except editpar.UnfoundParamError as pe:
            showwarning(message=str(pe), title="Error in "+os.path.basename(fname))
        # trip any triggers
        self.checkAllTriggers('fopen')

        # This new fname is our current context
        self.updateTitle(fname)
        self._taskParsObj.filename = fname # !! maybe try setCurrentContext() ?
        self.freshenFocus()
        self.showStatus("Loaded values from: "+fname, keep=2)

        # Since we are in a new context (and have made no changes yet), make
        # a copy so we know what the last state was.
        # The dict() method returns a deep-copy dict of the keyvals.
        self._lastSavedState = self._taskParsObj.dict()
1147028
def getfile(self):
        
        current_file = str(self.selectedFiles()[0])
        if os.path.isfile(current_file):
            print 'current_file', current_file
            if current_file.endswith('.raw') or current_file.endswith('.pst'):
                fmode = 'r'
            else:
                fmode = 'a'
        else:
            if not current_file.endswith('.hdf5') and not current_file.endswith('.h5'):
                current_file += '.hdf5'
            fmode = 'w-'
        return current_file, fmode
510179
def _load(self):
        
        if self.is_exists():
            return open(self._ref, "rb").read()
        raise NotFoundError("File %s not found" % self._ref)
870668
def open_buffer(self, location=None, show_in_current_window=False):
        
        eb = self._get_or_create_editor_buffer(location)

        if show_in_current_window:
            self.show_editor_buffer(eb)
1270098
def select_window_with_click(self):
        
        window_ret = window_t(0)
        _libxdo.xdo_select_window_with_click(
            self._xdo, ctypes.byref(window_ret))
        return window_ret.value