Commit eed925f2 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

RF: Demo notebook is now run from tempdir

parent 6ae21e4a
......@@ -6,6 +6,8 @@
#
import sys
import shutil
import tempfile
import os.path as op
import notebook.notebookapp as notebookapp
......@@ -20,7 +22,11 @@ def main(argv=None):
thisdir = op.abspath(op.dirname(__file__))
nbdir = op.join(thisdir, 'demo')
bash_kernel_install.main([])
notebookapp.main(['--notebook-dir', nbdir] + argv)
with tempfile.TemporaryDirectory() as tmpdir:
tmpdir = op.join(tmpdir, 'demo')
shutil.copytree(nbdir, tmpdir)
notebookapp.main(['--notebook-dir', tmpdir] + argv)
if __name__ == '__main__':
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment