Support connecting to existing ipython session. #71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use cases:
and connect it to local lightweight machine running emacs.
configures ipython session and configuration can't simply be
added to ~/.ipython/profile_default.
Simply naming session with connection json is simple solution that works well.
I considered additional parameter, "existing-session", but it would require much more code changes, as it would require passing one more argument in all tornado requests.
I am running it in my emacs and it works. To test:
import os
from ipykernel.kernelapp import IPKernelApp
app = IPKernelApp.instance()
app.initialize([])
kernel = app.kernel
kernel.shell.push({'print_me': 'Running in previously started kernel.'})
app.start()
2. Get json from previous command and name a session after your json file. For example:
+BEGIN_SRC ipython :session kernel-8520.json :results output
+END_SRC
+RESULTS:
: Running in previously started kernel.