• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python baseshell.ExternalShellBase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: finished

 def finished(self, exit_code, exit_status):
     """Reimplement ExternalShellBase method"""
     if self.is_ipykernel and exit_code == 1:
         self.emit(SIGNAL("ipython_kernel_start_error(QString)"),
                   self.shell.get_text_with_eol())
     ExternalShellBase.finished(self, exit_code, exit_status)
     self.introspection_socket = None
开发者ID:ymarfoq,项目名称:outilACVDesagregation,代码行数:7,代码来源:pythonshell.py


示例2: get_options_menu

 def get_options_menu(self):
     ExternalShellBase.get_options_menu(self)
     self.interact_action = create_action(self, _("Interact"))
     self.interact_action.setCheckable(True)
     self.debug_action = create_action(self, _("Debug"))
     self.debug_action.setCheckable(True)
     self.args_action = create_action(self, _("Arguments..."),
                                      triggered=self.get_arguments)
     self.post_mortem_action = create_action(self, _("Post Mortem Debug"))
     self.post_mortem_action.setCheckable(True)
     run_settings_menu = QMenu(_("Run settings"), self)
     add_actions(run_settings_menu,
                 (self.interact_action, self.debug_action, self.args_action,
                  self.post_mortem_action))
     self.cwd_button = create_action(self, _("Working directory"),
                             icon=get_std_icon('DirOpenIcon'),
                             tip=_("Set current working directory"),
                             triggered=self.set_current_working_directory)
     self.env_button = create_action(self, _("Environment variables"),
                                     icon=get_icon('environ.png'),
                                     triggered=self.show_env)
     self.syspath_button = create_action(self,
                                         _("Show sys.path contents"),
                                         icon=get_icon('syspath.png'),
                                         triggered=self.show_syspath)
     actions = [run_settings_menu, self.show_time_action, None,
                self.cwd_button, self.env_button, self.syspath_button]
     if self.menu_actions is not None:
         actions += [None]+self.menu_actions
     return actions
开发者ID:Micseb,项目名称:spyder,代码行数:30,代码来源:pythonshell.py


示例3: __init__

    def __init__(
        self,
        parent=None,
        wdir=None,
        path=[],
        light_background=True,
        menu_actions=None,
        show_buttons_inside=True,
        show_elapsed_time=True,
    ):
        ExternalShellBase.__init__(
            self,
            parent=parent,
            fname=None,
            wdir=wdir,
            history_filename=".history",
            light_background=light_background,
            menu_actions=menu_actions,
            show_buttons_inside=show_buttons_inside,
            show_elapsed_time=show_elapsed_time,
        )

        # Additional python path list
        self.path = path

        # For compatibility with the other shells that can live in the external
        # console
        self.is_ipykernel = False
        self.connection_file = None
开发者ID:ftsiadimos,项目名称:spyder,代码行数:29,代码来源:systemshell.py


示例4: get_toolbar_buttons

 def get_toolbar_buttons(self):
     ExternalShellBase.get_toolbar_buttons(self)
     if self.namespacebrowser_button is None and self.stand_alone is not None:
         self.namespacebrowser_button = create_toolbutton(
             self,
             text=_("Variables"),
             icon=get_icon("dictedit.png"),
             tip=_("Show/hide global variables explorer"),
             toggled=self.toggle_globals_explorer,
             text_beside_icon=True,
         )
     if self.terminate_button is None:
         self.terminate_button = create_toolbutton(
             self,
             text=_("Terminate"),
             icon=get_icon("stop.png"),
             tip=_(
                 "Attempts to stop the process. The process\n"
                 "may not exit as a result of clicking this\n"
                 "button (it is given the chance to prompt\n"
                 "the user for any unsaved files, etc)."
             ),
         )
     buttons = []
     if self.namespacebrowser_button is not None:
         buttons.append(self.namespacebrowser_button)
     buttons += [self.run_button, self.terminate_button, self.kill_button, self.options_button]
     return buttons
开发者ID:arvindchari88,项目名称:newGitTest,代码行数:28,代码来源:pythonshell.py


示例5: __init__

 def __init__(self, parent=None, wdir=None, path=[], light_background=True,
              menu_actions=None, show_buttons_inside=True,
              show_elapsed_time=True):
     ExternalShellBase.__init__(self, parent, wdir,
                                history_filename='.history',
                                light_background=light_background,
                                menu_actions=menu_actions,
                                show_buttons_inside=show_buttons_inside,
                                show_elapsed_time=show_elapsed_time)
     
     # Additional python path list
     self.path = path
开发者ID:jromang,项目名称:retina-old,代码行数:12,代码来源:systemshell.py


示例6: set_buttons_runnning_state

 def set_buttons_runnning_state(self, state):
     ExternalShellBase.set_buttons_runnning_state(self, state)
     self.interact_action.setEnabled(not state and not self.is_interpreter)
     self.debug_action.setEnabled(not state and not self.is_interpreter)
     self.args_action.setEnabled(not state and not self.is_interpreter)
     if state:
         if self.arguments:
             argstr = _("Arguments: %s") % self.arguments
         else:
             argstr = _("No argument")
     else:
         argstr = _("Arguments...")
     self.args_action.setText(argstr)
     self.terminate_button.setVisible(not self.is_interpreter and state)
     if not state:
         self.toggle_globals_explorer(False)
     for btn in (self.cwd_button, self.env_button, self.syspath_button):
         btn.setEnabled(state and self.monitor_enabled)
     if self.namespacebrowser_button is not None:
         self.namespacebrowser_button.setEnabled(state)
开发者ID:ymarfoq,项目名称:outilACVDesagregation,代码行数:20,代码来源:pythonshell.py


示例7: __init__

    def __init__(self, parent=None):
        ExternalShellBase.__init__(self, parent=parent, fname=None, wdir='.',
                                   history_filename='.history',
                                   light_background=True,
                                   menu_actions=None,
                                   show_buttons_inside=False,
                                   show_elapsed_time=False)

        self.setObjectName('SpyderShellWidget')

        # capture tab key
        #self.shell._key_tab = self._key_tab

        self.shell.set_pythonshell_font(QFont('Mono'))

        # Additional python path list
        self.path = []

        # For compatibility with the other shells that can live in the external console
        self.is_ipython_kernel = False
        self.connection_file = None

        self.create_process()
开发者ID:OSUrobotics,项目名称:rqt_common_plugins,代码行数:23,代码来源:spyder_shell_widget.py


示例8: closeEvent

 def closeEvent(self, event):
     self.quit_monitor()
     ExternalShellBase.closeEvent(self, event)
开发者ID:Micseb,项目名称:spyder,代码行数:3,代码来源:pythonshell.py


示例9: __init__

    def __init__(self, parent=None, fname=None, wdir=None,
                 interact=False, debug=False, post_mortem=False,
                 path=[], python_args='',
                 ipykernel=False, arguments='', stand_alone=None,
                 umr_enabled=True, umr_namelist=[], umr_verbose=True,
                 pythonstartup=None, pythonexecutable=None,
                 monitor_enabled=True, mpl_backend=None, ets_backend='qt4',
                 qt_api=None, pyqt_api=0,
                 ignore_sip_setapi_errors=False, merge_output_channels=False,
                 colorize_sys_stderr=False, autorefresh_timeout=3000,
                 autorefresh_state=True, light_background=True,
                 menu_actions=None, show_buttons_inside=True,
                 show_elapsed_time=True):

        assert qt_api in (None, 'pyqt', 'pyside')

        self.namespacebrowser = None # namespace browser widget!
        
        self.dialog_manager = DialogManager()
        
        self.stand_alone = stand_alone # stand alone settings (None: plugin)
        self.interact = interact
        self.is_ipykernel = ipykernel
        self.pythonstartup = pythonstartup
        self.pythonexecutable = pythonexecutable
        self.monitor_enabled = monitor_enabled
        self.mpl_backend = mpl_backend
        self.ets_backend = ets_backend
        self.qt_api = qt_api
        self.pyqt_api = pyqt_api
        self.ignore_sip_setapi_errors = ignore_sip_setapi_errors
        self.merge_output_channels = merge_output_channels
        self.colorize_sys_stderr = colorize_sys_stderr
        self.umr_enabled = umr_enabled
        self.umr_namelist = umr_namelist
        self.umr_verbose = umr_verbose
        self.autorefresh_timeout = autorefresh_timeout
        self.autorefresh_state = autorefresh_state
                
        self.namespacebrowser_button = None
        self.cwd_button = None
        self.env_button = None
        self.syspath_button = None
        self.terminate_button = None

        self.notification_thread = None
        
        ExternalShellBase.__init__(self, parent=parent, fname=fname, wdir=wdir,
                                   history_filename='history.py',
                                   light_background=light_background,
                                   menu_actions=menu_actions,
                                   show_buttons_inside=show_buttons_inside,
                                   show_elapsed_time=show_elapsed_time)

        if self.pythonexecutable is None:
            self.pythonexecutable = get_python_executable()

        self.python_args = None
        if python_args:
            assert is_text_string(python_args)
            self.python_args = python_args
        
        assert is_text_string(arguments)
        self.arguments = arguments
        
        self.connection_file = None

        if self.is_ipykernel:
            self.interact = False
            # Running our custom startup script for IPython kernels:
            # (see spyderlib/widgets/externalshell/start_ipython_kernel.py)
            self.fname = get_module_source_path(
                'spyderlib.widgets.externalshell', 'start_ipython_kernel.py')
        
        self.shell.set_externalshell(self)

        self.toggle_globals_explorer(False)
        self.interact_action.setChecked(self.interact)
        self.debug_action.setChecked(debug)
        
        
        self.introspection_socket = None
        self.is_interpreter = fname is None
        
        if self.is_interpreter:
            self.terminate_button.hide()
            
        self.post_mortem_action.setChecked(post_mortem and not self.is_interpreter)
        
        # Additional python path list
        self.path = path
        self.shell.path = path
开发者ID:Micseb,项目名称:spyder,代码行数:92,代码来源:pythonshell.py


示例10: transcode

 def transcode(self, qba):
     if os.name == 'nt':
         return to_text_string( CP850_CODEC.toUnicode(qba.data()) )
     else:
         return ExternalShellBase.transcode(self, qba)
开发者ID:ChunHungLiu,项目名称:spyder,代码行数:5,代码来源:systemshell.py


示例11: transcode

 def transcode(self, bytes):
     if os.name == 'nt':
         return encoding.transcode(str(bytes.data()), 'cp850')
     else:
         return ExternalShellBase.transcode(self, bytes)
开发者ID:jromang,项目名称:retina-old,代码行数:5,代码来源:systemshell.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python monitor.communicate函数代码示例发布时间:2022-05-27
下一篇:
Python comboboxes.PythonModulesComboBox类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap