5 examples of 'change directory in jupyter notebook' in Python

Every line of 'change directory in jupyter notebook' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
26@staticmethod
27def _init_jupyter(jupyter_path):
28 if not os.path.exists(jupyter_path):
29 jupyter_source_dir = os.path.join(parade.__path__[0], 'template', 'workspace', 'jupyter')
30 copytree(jupyter_source_dir, jupyter_path, IGNORE)
31
32 os.environ['JUPYTER_PATH'] = jupyter_path
33 os.environ['IPYTHONDIR'] = os.path.join(jupyter_path, 'ipython')
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

131@property
132def notebook_dir(self):
133 return self.root_dir / 'notebook'
99@observe('work_dir')
100def _work_dir_changed(self, change):
101 self.work_dir = unicode_type(expand_path(change['new']))
35@property
36def current(self):
37 return self._cwd
50def test_nb_dir():
51 with TemporaryDirectory() as td:
52 app = NotebookApp(notebook_dir=td)
53 nt.assert_equal(app.notebook_dir, td)

Related snippets