jupyter-server / kernel_gateway

Jupyter Kernel Gateway
http://jupyter-kernel-gateway.readthedocs.org/en/latest/
Other
504 stars 130 forks source link

How to correctly use the `--KernelManager.connection_file` CLI parameter? #286

Closed dangom closed 6 years ago

dangom commented 6 years ago

Sorry if this is the wrong project to ask this question. I didn't know where else to ask for information (SO attempt failed).

According to jupyter kernel --help-all, I should be able to change the jupyter kernel JSON connection file by setting a parameter called --KernelManager.connection_file.

If I understand this correctly, that means that the following command:

jupyter kernel --KernelManager.connection_file=connection.json

should start a kernel and give me a connection file called connection.json.

However, this is what I get:

→ jupyter kernel --KernelManager.connection_file='test-this-thing.json'
[KernelApp] Starting kernel 'python3'
[KernelApp] Connection file: /Users/me/Library/Jupyter/runtime/kernel-1e65d0fe-bf8e-1234-8208-463bd4a1234a.json

Now, jupyter doesn't complain that I've passed a wrong argument nor anything, it just doesn't change the connection file.

Am I doing something wrong? How can I correctly change the connection filename?

kevin-bates commented 6 years ago

Hi Daniel - this property is defined in the ConnectionFileMixin class of jupyter_client (in connect.py). I wasn't aware of such a capability, but then again, this isn't something we'd use in Kernel (or Enterprise) Gateway. You might try posting a question to https://github.com/jupyter/jupyter_client.

dangom commented 6 years ago

Thank you for the reply. I'll ask under jupyter client.