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

Python shell.PythonShellWidget类代码示例

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

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



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

示例1: setup_context_menu

 def setup_context_menu(self):
     """Reimplement PythonShellWidget method"""
     PythonShellWidget.setup_context_menu(self)
     self.help_action = create_action(self, _("Help..."),
                        icon=ima.icon('DialogHelpButton'),
                        triggered=self.help)
     self.menu.addAction(self.help_action)
开发者ID:rthouvenin,项目名称:spyder,代码行数:7,代码来源:internalshell.py


示例2: setup_context_menu

 def setup_context_menu(self):
     """Reimplement PythonShellWidget method"""
     PythonShellWidget.setup_context_menu(self)
     self.help_action = create_action(self,
                        translate("InteractiveShell", "Help..."),
                        icon=get_std_icon('DialogHelpButton'),
                        triggered=self.help)
     self.menu.addAction(self.help_action)
开发者ID:Brainsciences,项目名称:luminoso,代码行数:8,代码来源:interactiveshell.py


示例3: __init__

 def __init__(self, parent, history_filename, debug=False, profile=False):
     PythonShellWidget.__init__(self, parent, history_filename,
                                debug, profile)
     # Code completion / calltips
     getcfg = lambda option: CONF.get('external_shell', option)
     case_sensitive = getcfg('autocompletion/case-sensitivity')
     show_single = getcfg('autocompletion/select-single')
     from_document = getcfg('autocompletion/from-document')
     self.setup_code_completion(case_sensitive, show_single, from_document)
开发者ID:Brainsciences,项目名称:luminoso,代码行数:9,代码来源:pythonshell.py


示例4: __init__

    def __init__(
        self,
        parent=None,
        namespace=None,
        commands=[],
        message=None,
        max_line_count=300,
        font=None,
        exitfunc=None,
        profile=False,
        multithreaded=True,
        light_background=True,
    ):
        PythonShellWidget.__init__(self, parent, get_conf_path("history_internal.py"), profile)

        self.set_light_background(light_background)
        self.multithreaded = multithreaded
        self.setMaximumBlockCount(max_line_count)

        # For compatibility with ExtPythonShellWidget
        self.is_ipykernel = False

        if font is not None:
            self.set_font(font)

        # Allow raw_input support:
        self.input_loop = None
        self.input_mode = False

        # KeyboardInterrupt support
        self.interrupted = False  # used only for not-multithreaded mode
        self.sig_keyboard_interrupt.connect(self.keyboard_interrupt)

        # Code completion / calltips
        getcfg = lambda option: CONF.get("internal_console", option)
        case_sensitive = getcfg("codecompletion/case_sensitive")
        self.set_codecompletion_case(case_sensitive)

        # keyboard events management
        self.eventqueue = []

        # Init interpreter
        self.exitfunc = exitfunc
        self.commands = commands
        self.message = message
        self.interpreter = None
        self.start_interpreter(namespace)

        # Clear status bar
        self.status.emit("")

        # Embedded shell -- requires the monitor (which installs the
        # 'open_in_spyder' function in builtins)
        if hasattr(builtins, "open_in_spyder"):
            self.go_to_error.connect(self.open_with_external_spyder)
开发者ID:dimikara,项目名称:spyder,代码行数:55,代码来源:internalshell.py


示例5: __init__

    def __init__(self, parent=None, namespace=None, commands=None, message="",
                 font=None, debug=False, exitfunc=None, profile=False):
        PythonShellWidget.__init__(self, parent,
                                   get_conf_path('.history_ic.py'),
                                   debug, profile)
        
        if font is not None:
            self.set_font(font)
        
        # Capture all interactive input/output 
        self.initial_stdout = sys.stdout
        self.initial_stderr = sys.stderr
        self.initial_stdin = sys.stdin
        self.stdout = IOHandler('<spyder_stdout>', 'w',
                                write_func=self.write,
                                flush_func=lambda: self.flush(error=False))
        self.stderr = IOHandler('<spyder_stderr>', 'w',
                                write_func=self.write_error,
                                flush_func=lambda: self.flush(error=True))
        self.stdin = IOHandler('<spyder_stdin>', 'r',
                               read_func=self.wait_input)
        self.redirect_stds()
        
        # KeyboardInterrupt support
        self.interrupted = False
        self.connect(self, SIGNAL("keyboard_interrupt()"),
                     self.keyboard_interrupt)
        
        # Code completion / calltips
        getcfg = lambda option: CONF.get('shell', option)
        case_sensitive = getcfg('autocompletion/case-sensitivity')
        show_single = getcfg('autocompletion/select-single')
        from_document = getcfg('autocompletion/from-document')
        self.setup_code_completion(case_sensitive, show_single, from_document)
        
        # keyboard events management
        self.busy = False
        self.eventqueue = []
        
        # Execution Status
        self.more = False

        # Init interpreter
        self.exitfunc = exitfunc
        self.commands = commands
        self.message = message
        self.interpreter = None
        self.start_interpreter(namespace)
        
        # Clear status bar
        self.emit(SIGNAL("status(QString)"), QString())
开发者ID:Brainsciences,项目名称:luminoso,代码行数:51,代码来源:interactiveshell.py


示例6: __init__

    def __init__(self, parent=None, namespace=None, commands=[], message="",
                 max_line_count=300, font=None, debug=False, exitfunc=None,
                 profile=False, multithreaded=True):
        PythonShellWidget.__init__(self, parent,
                                   get_conf_path('.history_internal.py'),
                                   debug, profile)
        
        self.multithreaded = multithreaded
        
        self.setMaximumBlockCount(max_line_count)
        
        if font is not None:
            self.set_font(font)
        
        # KeyboardInterrupt support
        self.interrupted = False # used only for not-multithreaded mode
        self.connect(self, SIGNAL("keyboard_interrupt()"),
                     self.keyboard_interrupt)
        
        # Code completion / calltips
        getcfg = lambda option: CONF.get('shell', option)
        case_sensitive = getcfg('codecompletion/case-sensitivity')
        show_single = getcfg('codecompletion/select-single')
        from_document = getcfg('codecompletion/from-document')
        self.setup_code_completion(case_sensitive, show_single, from_document)
        
        # keyboard events management
        self.eventqueue = []

        # Init interpreter
        self.exitfunc = exitfunc
        self.commands = commands
        self.message = message
        self.interpreter = None
        self.start_interpreter(namespace)
        
        # Clear status bar
        self.emit(SIGNAL("status(QString)"), QString())
开发者ID:cheesinglee,项目名称:spyder,代码行数:38,代码来源:internalshell.py


示例7: __init__

 def __init__(self, parent, history_filename, profile=False):
     PythonShellWidget.__init__(self, parent, history_filename, profile)
     self.path = []
开发者ID:Micseb,项目名称:spyder,代码行数:3,代码来源:pythonshell.py


示例8: flush

 def flush(self, error=False, prompt=False):
     """Reimplement ShellBaseWidget method"""
     PythonShellWidget.flush(self, error=error, prompt=prompt)
     if self.interrupted:
         self.interrupted = False
         raise KeyboardInterrupt
开发者ID:rthouvenin,项目名称:spyder,代码行数:6,代码来源:internalshell.py


示例9: __init__

 def __init__(self, parent, history_filename, debug=False, profile=False):
     PythonShellWidget.__init__(self, parent, history_filename,
                                debug, profile)
开发者ID:cheesinglee,项目名称:spyder,代码行数:3,代码来源:pythonshell.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python base.ConsoleBaseWidget类代码示例发布时间:2022-05-27
下一篇:
Python findreplace.FindReplace类代码示例发布时间: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