rasbt / watermark

An IPython magic extension for printing date and time stamps, version numbers, and hardware information
Other
884 stars 90 forks source link

Determine what version of jupyter notebook the code is currently being run in #93

Open paddymul opened 9 months ago

paddymul commented 9 months ago

Many times users don't know if they are running in a Jupyter Notebook, Jupyter Lab, Google Colab, or VSCode notebook. There are many other notebook environments. All with slight incompatibilities that make it difficult to debug for notebook extension maintainers.

I wrote a convenience function for my library that does this. Do you think this would be useful for watermark? https://github.com/paddymul/buckaroo/blob/main/buckaroo/__init__.py#L50-L67

rasbt commented 9 months ago

Thanks for sharing. This looks nice and elegant. And yes, I think this could indeed be a useful addition. Perhaps under a --jupyter_env flag.