Skip to content

Commit

Permalink
Un-expose __file__ and expose __session__ instead. (#1095)
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Feb 13, 2023
1 parent 0f09aa6 commit 1a486e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ipykernel/ipkernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def __init__(self, **kwargs):

jupyter_session_name = os.environ.get('JPY_SESSION_NAME')
if jupyter_session_name:
self.shell.user_ns['__file__'] = jupyter_session_name
self.shell.user_ns['__session__'] = jupyter_session_name

self.shell.displayhook.pub_socket = self.iopub_socket
self.shell.displayhook.topic = self._topic("execute_result")
Expand Down

0 comments on commit 1a486e0

Please sign in to comment.