-
Notifications
You must be signed in to change notification settings - Fork 76
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
How to detect xeus-python? #470
Comments
You could do something like: sys.modules['IPython'].get_ipython().__class__.__name__ == 'XPythonShell' |
It's a bit weak though. As this class is not part of the API, so we cannot ensure the name of the class will remain the same. |
I think we should add a |
This I see some references to IPKernelApp in ipython directly (https://github.com/ipython/ipython/search?q=ipkernelapp), I just hope it doesn't come from there... |
From what I see on my machine, it only contains the path to the connection file. I guess there might be more complex configurations, but we don't have to replicate IPykernel behavior, as long as we provide a similar way to identify whether the kernel is IPykernel or xeus-python. |
How would you detect from code running in a notebook whether it is running in a xeus kernel?
To detect ipykernel, you could do:
Is there a xeus analogue?
The text was updated successfully, but these errors were encountered: