jupyter
jupyter copied to clipboard
jupyter-load-file -- "/path file/with spaces"
Hi, sorry for my English :) When I try to upload a file with spaces in path, I get a Traceback:
OSError: File `'/very/long'` not found.
During handling of the above exception, another exception occurred:
Exception Traceback (most recent call last)
<ipython-input-44-79d3b1904738> in <module>
----> 1 get_ipython().run_line_magic('run', '/vey/long path/to/file.py')
I use a temporary hack for this case:
(defun jupyter-load-file-test ()
(interactive)
(jupyter-eval-string
(jupyter-load-file-code (concat "'" buffer-file-name "'"))))
(global-set-key (kbd "C-c f") 'jupyter-load-file-test)
I don’t know, maybe it will be useful ...
You can add the quotes to the argument of the function below
https://github.com/nnicandro/emacs-jupyter/blob/6ce8d01e3a550a3268b415bf9d9b635d4dba5940/jupyter-python.el#L77-L78
and submit a pull request.
But I think you should use double quotes since single quotes are not supported on Windows according to the last point here.