Simply returns either notebook filename or the full path to the notebook when run from Jupyter notebook in browser.
Project description
ipynbname
When run in a Jupyter notebook, simply returns the notebook filename or the full path to the notebook.
Examples
Get the notebook name:
import ipynbname
nb_fname = ipynbname.name()
Get the full path to the notebook:
import ipynbname
nb_path = ipynbname.path()
You would think there was already some built-in way to access the current notebook name, but it took many hours of searching for a way to do it. As it seems many others did, I tried using Javascript, but the async nature of JS meant that it was unreliable. Finally I stumbled on this post. Credit for most of the code goes to the author of this post, thanks!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ipynbname-2020.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3aa2f76d0c1cfb40f3f781b238a972275959ea7c078fe08591feaa9a7d412e8c |
|
MD5 | f4cf25fdbb124c75abccdcbdd377ea63 |
|
BLAKE2b-256 | 3d9f4b43ac7874831e51f0ecdbae90bbdb625c00ac52acb8f51b0307343ee52e |