##// END OF EJS Templates
Moved init_io and init_traceback_handlers after readline_init.
Brian Granger -
Show More
@@ -227,6 +227,9 b' class InteractiveShell(Configurable, Magic):'
227 # This has to be done after init_create_namespaces because it uses
227 # This has to be done after init_create_namespaces because it uses
228 # something in self.user_ns, but before init_sys_modules, which
228 # something in self.user_ns, but before init_sys_modules, which
229 # is the first thing to modify sys.
229 # is the first thing to modify sys.
230 # TODO: When we override sys.stdout and sys.stderr before this class
231 # is created, we are saving the overridden ones here. Not sure if this
232 # is what we want to do.
230 self.save_sys_module_state()
233 self.save_sys_module_state()
231 self.init_sys_modules()
234 self.init_sys_modules()
232
235
@@ -239,11 +242,8 b' class InteractiveShell(Configurable, Magic):'
239 self.init_syntax_highlighting()
242 self.init_syntax_highlighting()
240 self.init_hooks()
243 self.init_hooks()
241 self.init_pushd_popd_magic()
244 self.init_pushd_popd_magic()
242 # TODO: init_io() needs to happen before init_traceback handlers
245 # self.init_traceback_handlers use to be here, but we moved it below
243 # because the traceback handlers hardcode the stdout/stderr streams.
246 # because it and init_io have to come after init_readline.
244 # This logic in in debugger.Pdb and should eventually be changed.
245 self.init_io()
246 self.init_traceback_handlers(custom_exceptions)
247 self.init_user_ns()
247 self.init_user_ns()
248 self.init_logger()
248 self.init_logger()
249 self.init_alias()
249 self.init_alias()
@@ -257,7 +257,14 b' class InteractiveShell(Configurable, Magic):'
257
257
258 # The following was in post_config_initialization
258 # The following was in post_config_initialization
259 self.init_inspector()
259 self.init_inspector()
260 # init_readline() must come before init_io(), because init_io uses
261 # readline related things.
260 self.init_readline()
262 self.init_readline()
263 # TODO: init_io() needs to happen before init_traceback handlers
264 # because the traceback handlers hardcode the stdout/stderr streams.
265 # This logic in in debugger.Pdb and should eventually be changed.
266 self.init_io()
267 self.init_traceback_handlers(custom_exceptions)
261 self.init_prompts()
268 self.init_prompts()
262 self.init_displayhook()
269 self.init_displayhook()
263 self.init_reload_doctest()
270 self.init_reload_doctest()
General Comments 0
You need to be logged in to leave comments. Login now