Permalink
Browse files

flush stdout/err after init_code

prevents startup script/file output from being attached to the first cell of a frontend
  • Loading branch information...
minrk committed Dec 21, 2011
1 parent 1e91756 commit 8d7b393b1bd8d5ca697e8e1b25ecb02387b7ced4
Showing with 4 additions and 0 deletions.
  1. +4 −0 IPython/core/shellapp.py
View
@@ -184,6 +184,10 @@ def init_code(self):
self._run_exec_files()
self._run_cmd_line_code()
+ # flush output, so itwon't be attached to the first cell
+ sys.stdout.flush()
+ sys.stderr.flush()
+
# Hide variables defined here from %who etc.
self.shell.user_ns_hidden.update(self.shell.user_ns)

0 comments on commit 8d7b393

Please sign in to comment.