Closed post2web closed 8 years ago
It will be very useful if I could do this:
mynb = load_notebook('mynb.ipynb', locals=dict(a=5)) print mynb.a
I know I can set mynb.a = 5 after it has been imported but a way to inject local variables before importing could create very interesting workflows.
Another way this could potentially look like:
mynb = load_notebook('mynb.ipynb', execute=False) mynb.a = 5 mynb.execute() print mynb.a
I would appreciate any workaround ideas.
This is a neat idea.
As you can tell, we haven't been spending much time over here in the CMS extension vs some of our other incubator projects. We'll gladly take a PR if you'd like to give it a shot.
It will be very useful if I could do this:
I know I can set mynb.a = 5 after it has been imported but a way to inject local variables before importing could create very interesting workflows.
Another way this could potentially look like:
I would appreciate any workaround ideas.