Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

%run on files with space in names

I'm trying to use the magic command %run on a notebook which has spaces in the filename.

%run Crazy Code.ipynb
ERROR:root:File `'Crazy.py'` not found.

Is there a way around this without changing the file name? I have a lot of notebooks whose names have spaces in between words; I find it easier to read.

like image 866
Moondra Avatar asked Oct 24 '25 03:10

Moondra


1 Answers

File names with spaces in them are typically wrapped in double quotes to solve this problem. In your case, this would be:

%run "Crazy Code.ipynb"

like image 119
nathantspencer Avatar answered Oct 25 '25 22:10

nathantspencer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!