##// END OF EJS Templates
support downgrading notebooks with nbconvert...
support downgrading notebooks with nbconvert Use: ipython nbconvert --to notebook --nbformat 3 notebook.ipynb to write `notebook.v3.ipynb` Adds `output_suffix` resource, inserted before file ext. Suffix is used if `--output` is not specified. Default is `.nbconvert`, to prevent `--to notebook` from clobbering existing notebooks by default.

File last commit:

r16120:24b93a1d
r18247:d7aa64bd
Show More
job_wrapper.py
25 lines | 542 B | text/x-python | PythonLexer
#!/usr/bin/env python
"""Python wrapper around a submitted workflow job.
In reality this would be a more sophisticated script, here we only illustrate
the basic idea by considering that a submitted 'job' is a Python string to be
executed.
"""
import sys
argv = sys.argv
from IPython.parallel.engine import EngineFactory
from IPython.parallel.ipengineapp import launch_new_instance
ns = {}
# job
exec sys.argv[1] in ns
# this should really use Config:
EngineFactory.user_ns = ns
# start engine with job namespace
launch_new_instance()