Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update parallel %autopx magics to reflect recent changes in run_cell,…

… run_code
  • Loading branch information...
commit e68cf3acfde04fb1164c3b13d32f69fceb68eaab 1 parent b5a53ec
@minrk authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 IPython/extensions/parallelmagic.py
View
12 IPython/extensions/parallelmagic.py
@@ -185,17 +185,21 @@ def _maybe_display_output(self, result):
print '[stdout:%i]'%eid, stdout[i]
- def pxrun_cell(self, cell, store_history=True):
+ def pxrun_cell(self, raw_cell, store_history=True):
"""drop-in replacement for InteractiveShell.run_cell.
This executes code remotely, instead of in the local namespace.
See InteractiveShell.run_cell for details.
"""
+
+ if (not raw_cell) or raw_cell.isspace():
+ return
+
ipself = self.shell
- raw_cell = cell
+
with ipself.builtin_trap:
- cell = ipself.prefilter_manager.prefilter_lines(cell)
+ cell = ipself.prefilter_manager.prefilter_lines(raw_cell)
# Store raw and processed history
if store_history:
@@ -244,7 +248,7 @@ def pxrun_cell(self, cell, store_history=True):
self._maybe_display_output(result)
return False
- def pxrun_code(self, code_obj, post_execute=True):
+ def pxrun_code(self, code_obj):
"""drop-in replacement for InteractiveShell.run_code.
This executes code remotely, instead of in the local namespace.
Please sign in to comment.
Something went wrong with that request. Please try again.