My module is uploaded to Pypi.
It can be used both in Jupiter notebooks .ipynb and in python program with the extension .py
There is additional functionality for Jupiter notebooks. How can I determine that the code is running in the Jupiter environment?
I am currently using this code:
if '_Jupyter' in globals():
# Do something special for Jupyter
But I don't like it. How to do it correctly?