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


Python PythonShellWidget.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from spyderlib.widgets.shell import PythonShellWidget [as 别名]
# 或者: from spyderlib.widgets.shell.PythonShellWidget import __init__ [as 别名]
 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,代码行数:11,代码来源:pythonshell.py

示例2: __init__

# 需要导入模块: from spyderlib.widgets.shell import PythonShellWidget [as 别名]
# 或者: from spyderlib.widgets.shell.PythonShellWidget import __init__ [as 别名]
    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,代码行数:57,代码来源:internalshell.py

示例3: __init__

# 需要导入模块: from spyderlib.widgets.shell import PythonShellWidget [as 别名]
# 或者: from spyderlib.widgets.shell.PythonShellWidget import __init__ [as 别名]
    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,代码行数:53,代码来源:interactiveshell.py

示例4: __init__

# 需要导入模块: from spyderlib.widgets.shell import PythonShellWidget [as 别名]
# 或者: from spyderlib.widgets.shell.PythonShellWidget import __init__ [as 别名]
    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,代码行数:40,代码来源:internalshell.py

示例5: __init__

# 需要导入模块: from spyderlib.widgets.shell import PythonShellWidget [as 别名]
# 或者: from spyderlib.widgets.shell.PythonShellWidget import __init__ [as 别名]
 def __init__(self, parent, history_filename, profile=False):
     PythonShellWidget.__init__(self, parent, history_filename, profile)
     self.path = []
开发者ID:Micseb,项目名称:spyder,代码行数:5,代码来源:pythonshell.py

示例6: __init__

# 需要导入模块: from spyderlib.widgets.shell import PythonShellWidget [as 别名]
# 或者: from spyderlib.widgets.shell.PythonShellWidget import __init__ [as 别名]
 def __init__(self, parent, history_filename, debug=False, profile=False):
     PythonShellWidget.__init__(self, parent, history_filename,
                                debug, profile)
开发者ID:cheesinglee,项目名称:spyder,代码行数:5,代码来源:pythonshell.py


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