Running file when opening jupyter console using ZMQTerminalIPythonApp.file_to_run

From the documentation ( jupyter console --help-allin the terminal), it seems that the input jupyter console --ZMQTerminalIPythonApp.file_to_run='name_of_file'in the terminal should open the jupyter console and run the specified file.

However, if I prepare a test file:

# python file named 'test.py'
a = 101

and run the following command at the command prompt

jupyter console --ZMQTerminalIPythonApp.file_to_run='test.py'`

And then try the following command in the opened ipython terminal:

a

I get a NameError telling me that a is not defined. What am I doing wrong?

+4
source share

Source: https://habr.com/ru/post/1615721/


All Articles