Navigation Menu

Skip to content

Commit

Permalink
Remove flush_softspace option which is never used.
Browse files Browse the repository at this point in the history
  • Loading branch information
bfroehle committed Apr 26, 2012
1 parent 433b5ed commit 2d71382
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions IPython/core/interactiveshell.py
Expand Up @@ -2555,13 +2555,13 @@ def run_ast_nodes(self, nodelist, cell_name, interactivity='last_expr'):
for i, node in enumerate(to_run_exec):
mod = ast.Module([node])
code = self.compile(mod, cell_name, "exec")
if self.run_code(code, flush_softspace=False):
if self.run_code(code):
return True

for i, node in enumerate(to_run_interactive):
mod = ast.Interactive([node])
code = self.compile(mod, cell_name, "single")
if self.run_code(code, flush_softspace=False):
if self.run_code(code):
return True

# Flush softspace
Expand All @@ -2582,7 +2582,7 @@ def run_ast_nodes(self, nodelist, cell_name, interactivity='last_expr'):

return False

def run_code(self, code_obj, flush_softspace=True):
def run_code(self, code_obj):
"""Execute a code object.
When an exception occurs, self.showtraceback() is called to display a
Expand All @@ -2594,8 +2594,6 @@ def run_code(self, code_obj, flush_softspace=True):
A compiled code object, to be executed
post_execute : bool [default: True]
whether to call post_execute hooks after this particular execution.
flush_softspace : bool [default: True]
whether to flush softspace, i.e., print a new line after this particular execution.
Returns
-------
Expand Down Expand Up @@ -2629,10 +2627,6 @@ def run_code(self, code_obj, flush_softspace=True):
self.showtraceback()
else:
outflag = 0
if flush_softspace:
if softspace(sys.stdout, 0):
print

return outflag

# For backwards compatibility
Expand Down

0 comments on commit 2d71382

Please sign in to comment.