From 50ba7e2c47f36d526403acd4b908e712e483b2e9 Mon Sep 17 00:00:00 2001 From: Pietro D'Antuono Date: Fri, 21 Apr 2023 17:18:34 +0200 Subject: [PATCH] fix: dev: #154 Invoke: fixed nb task for Windows systems --- tasks/notebook.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tasks/notebook.py b/tasks/notebook.py index bb9a973..363780d 100644 --- a/tasks/notebook.py +++ b/tasks/notebook.py @@ -65,17 +65,18 @@ def start(c_r): c_r.run(_command) print(f">>> {colorize(_command, color=Color.OKBLUE)}\n") elif SYSTEM == OperatingSystem.WINDOWS: - _command = ( - "wt -d ./jupyter-notebooks jupyter notebook " - f"--port={c_r.start_port} --no-browser" - ) - print( - colorize( - "Notebook server is not attached to this terminal process." - " Close windows terminal instance instead.", - color=Color.WARNING, + with c_r.cd("./jupyter-notebooks"): + _command = ( + "wt -d . jupyter notebook " + f"--port={c_r.start_port}" + ) + print( + colorize( + "Notebook server is not attached to this terminal process." + " Close windows terminal instance instead.", + color=Color.WARNING, + ) ) - ) print(f"{tmp_str}") c_r.run(_command)