当前位置: 首页>>代码示例>>Python>>正文


Python compat.getopenfilename函数代码示例

本文整理汇总了Python中spyderlib.qt.compat.getopenfilename函数的典型用法代码示例。如果您正苦于以下问题:Python getopenfilename函数的具体用法?Python getopenfilename怎么用?Python getopenfilename使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getopenfilename函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: select_file

 def select_file(self):
     self.emit(SIGNAL('redirect_stdio(bool)'), False)
     filename, _selfilter = getopenfilename(self, _("Select Python script"),
                        getcwd(), _("Python scripts")+" (*.py ; *.pyw)")
     self.emit(SIGNAL('redirect_stdio(bool)'), False)
     if filename:
         self.analyze(filename)
开发者ID:alfonsodiecko,项目名称:PYTHON_DIST,代码行数:7,代码来源:profilergui.py

示例2: select_file

 def select_file(self):
     self.redirect_stdio.emit(False)
     filename, _selfilter = getopenfilename(self, _("Select Python file"),
                        getcwd(), _("Python files")+" (*.py ; *.pyw)")
     self.redirect_stdio.emit(True)
     if filename:
         self.analyze(filename)
开发者ID:gyenney,项目名称:Tools,代码行数:7,代码来源:pylintgui.py

示例3: compare

 def compare(self):
     filename, _selfilter = getopenfilename(self, _("Select script to compare"),
                                            getcwd(), _("Profiler result")+" (*.Result)")
     if filename:
         self.datatree.compare(filename)
         self.show_data()
         self.clear_button.setEnabled(True)
开发者ID:MarvinLiu0810,项目名称:spyder,代码行数:7,代码来源:profilergui.py

示例4: select_file

 def select_file(self, edit, filters=None):
     """Select File"""
     basedir = osp.dirname(to_text_string(edit.text()))
     if not osp.isdir(basedir):
         basedir = getcwd()
     if filters is None:
         filters = _("All files (*)")
     title = _("Select file")
     filename, _selfilter = getopenfilename(self, title, basedir, filters)
     if filename:
         edit.setText(filename)
开发者ID:gyenney,项目名称:Tools,代码行数:11,代码来源:configdialog.py

示例5: run_script

 def run_script(self, filename=None, silent=False, set_focus=False,
                args=None):
     """Run a Python script"""
     if filename is None:
         self.shell.interpreter.restore_stds()
         filename, _selfilter = getopenfilename(self, _("Run Python script"),
                os.getcwdu(), _("Python scripts")+" (*.py ; *.pyw ; *.ipy)")
         self.shell.interpreter.redirect_stds()
         if filename:
             os.chdir( os.path.dirname(filename) )
             filename = os.path.basename(filename)
         else:
             return
     command = "runfile(%s, args=%s)" % (repr(osp.abspath(filename)),
                                         repr(args))
     if set_focus:
         self.shell.setFocus()
     if self.dockwidget and not self.ismaximized:
         self.dockwidget.setVisible(True)
         self.dockwidget.raise_()
     self.shell.write(command+'\n')
     self.shell.run_command(command)
开发者ID:jromang,项目名称:retina-old,代码行数:22,代码来源:console.py

示例6: run_script

 def run_script(self, filename=None, silent=False, set_focus=False,
                args=None):
     """Run a Python script"""
     if filename is None:
         self.shell.interpreter.restore_stds()
         filename, _selfilter = getopenfilename(self, _("Run Python script"),
                getcwd(), _("Python scripts")+" (*.py ; *.pyw ; *.ipy)")
         self.shell.interpreter.redirect_stds()
         if filename:
             os.chdir( osp.dirname(filename) )
             filename = osp.basename(filename)
         else:
             return
     debug_print(args)
     filename = osp.abspath(filename)
     rbs = remove_backslashes
     command = "runfile('%s', args='%s')" % (rbs(filename), rbs(args))
     if set_focus:
         self.shell.setFocus()
     if self.dockwidget and not self.ismaximized:
         self.dockwidget.setVisible(True)
         self.dockwidget.raise_()
     self.shell.write(command+'\n')
     self.shell.run_command(command)
开发者ID:Micseb,项目名称:spyder,代码行数:24,代码来源:console.py

示例7: select_ssh_key

 def select_ssh_key(self):
     kf = getopenfilename(self, _('Select ssh key'), 
                          get_ipython_dir(), '*.pem;;*.*')[0]
     self.kf.setText(kf)
开发者ID:Poneyo,项目名称:spyderlib,代码行数:4,代码来源:ipythonconsole.py

示例8: select_connection_file

 def select_connection_file(self):
     cf = getopenfilename(self, _('Open IPython connection file'),
              osp.join(get_ipython_dir(), 'profile_default', 'security'),
              '*.json;;*.*')[0]
     self.cf.setText(cf)
开发者ID:Poneyo,项目名称:spyderlib,代码行数:5,代码来源:ipythonconsole.py


注:本文中的spyderlib.qt.compat.getopenfilename函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。