-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add environment variable at startup #123
Conversation
pyviz_comms/__init__.py
Outdated
@@ -30,6 +30,10 @@ def _jupyter_labextension_paths(): | |||
except NameError: | |||
get_ipython = None | |||
|
|||
# Setting this so we can check the launched jupyter has pyviz_comms installed | |||
if not (get_ipython and sys.argv[0].endswith('ipykernel_launcher.py')): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ipykernel_launcher.py
file is what launches a notebook.
I will update the comments if we decide to proceed with the PR.
The name of the environment variable can change maybe to PYVIZ_COMMS_INSTALLED
.
80bd6ab
to
24e0009
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
This way, we can check in a notebook if the environment variable is set and give a warning if it is not.
Also available in the jupyter terminal.