BUG: Remove output arg before calling run_pipeline

The IPython magic still created an output file because
the output argument was only removed after the pipeline
was run. This fix simply removes the argument before
the call to run_pipline() when running the IPython magic.
This commit is contained in:
Thomas Wiecki
2014-06-09 17:17:37 +02:00
parent f6cbd5eba8
commit 2a73873097
+3 -2
View File
@@ -121,11 +121,12 @@ def parse_cell_magic(line, cell):
if not local_namespace:
args['namespace'] = get_ipython().user_ns # flake8: noqa
perf = run_pipeline(print_algo=False, algo_text=cell, **args)
# If we are running inside NB, do not output to file but create a
# variable instead
output_var_name = args.pop('output', None)
perf = run_pipeline(print_algo=False, algo_text=cell, **args)
if output_var_name is not None:
get_ipython().user_ns[output_var_name] = perf # flake8: noqa