From 30c158f845e2a413e8d44d00d918bdb58ba79f95 2013-10-23 17:40:30 From: Thomas Kluyver Date: 2013-10-23 17:40:30 Subject: [PATCH] Merge pull request #4426 from minrk/kernel-cwd set kernel cwd to notebook's directory --- diff --git a/IPython/html/services/sessions/handlers.py b/IPython/html/services/sessions/handlers.py index 5f8c139..2913650 100644 --- a/IPython/html/services/sessions/handlers.py +++ b/IPython/html/services/sessions/handlers.py @@ -62,7 +62,7 @@ class SessionRootHandler(IPythonHandler): if sm.session_exists(name=name, path=path): model = sm.get_session(name=name, path=path) else: - kernel_id = km.start_kernel(cwd=nbm.notebook_dir) + kernel_id = km.start_kernel(cwd=nbm.get_os_path(path)) model = sm.create_session(name=name, path=path, kernel_id=kernel_id, ws_url=self.ws_url) location = url_path_join(self.base_kernel_url, 'api', 'sessions', model['id']) self.set_header('Location', url_escape(location))