Skip to content

Commit 1a486e0

Browse files
authored
Un-expose __file__ and expose __session__ instead. (#1095)
1 parent 0f09aa6 commit 1a486e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ipykernel/ipkernel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def __init__(self, **kwargs):
130130

131131
jupyter_session_name = os.environ.get('JPY_SESSION_NAME')
132132
if jupyter_session_name:
133-
self.shell.user_ns['__file__'] = jupyter_session_name
133+
self.shell.user_ns['__session__'] = jupyter_session_name
134134

135135
self.shell.displayhook.pub_socket = self.iopub_socket
136136
self.shell.displayhook.topic = self._topic("execute_result")

0 commit comments

Comments
 (0)