We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bda9c0 commit 1185d12Copy full SHA for 1185d12
ipykernel/ipkernel.py
@@ -3,6 +3,7 @@
3
import asyncio
4
import builtins
5
import getpass
6
+import os
7
import signal
8
import sys
9
import threading
@@ -126,6 +127,11 @@ def __init__(self, **kwargs):
126
127
compiler_class=XCachingCompiler,
128
)
129
self.shell.displayhook.session = self.session
130
+
131
+ jupyter_session_name = os.environ.get('JPY_SESSION_NAME')
132
+ if jupyter_session_name:
133
+ self.shell.user_ns['__file__'] = jupyter_session_name
134
135
self.shell.displayhook.pub_socket = self.iopub_socket
136
self.shell.displayhook.topic = self._topic("execute_result")
137
self.shell.display_pub.session = self.session
0 commit comments