How to run python script on Jupyter in the terminal?
Question: I want to execute one python script in Jupyter, but I don't want to use the
web browser (IPython Interactive terminal), I want to run a single command in
the Linux terminal to load & run the python script, so that I can get the
output from Jupyter.

I tried to run `jupyter notebook %run <my_script.py>`, but it seems jupyter
can't recognize `%run` variable.

Is it possible to do that?


Answer: You can use the `jupyter console -i` command to run an interactive jupyter
session in your terminal. From there you can run `import <my_script.py>`. Do
note that this is not the intended use case of either jupyter or the notebook
environment. You should run scripts using your normal python interpreter
instead.

