Created
October 14, 2022 21:50
-
-
Save galois17/ba17753b48f0e29c6afa6efd04dddb27 to your computer and use it in GitHub Desktop.
Check Jupyter kernel mapping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from jupyter_client import kernelspec | |
kernel_name = '<kernel_name>' | |
spec = kernelspec.get_kernel_spec(kernel_name) | |
print(spec.resource_dir) | |
json_name = 'kernel.json' | |
full_path = os.path.join(spec.resource_dir, json_name) | |
with open(full_path, 'r') as file: | |
data = file.read() | |
print(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment