Skip to content

Commit

Permalink
flush stdout/err after init_code
Browse files Browse the repository at this point in the history
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 8d7b393
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions IPython/core/shellapp.py
Expand Up @@ -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)

Expand Down

0 comments on commit 8d7b393

Please sign in to comment.