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)
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)
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)
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())
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())
def __init__(self, parent, history_filename, profile=False): PythonShellWidget.__init__(self, parent, history_filename, profile) self.path = []
def __init__(self, parent, history_filename, debug=False, profile=False): PythonShellWidget.__init__(self, parent, history_filename, debug, profile)