| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
IPython Bell is a simple magic for IPython and Jupyter Notebooks, which notifies you when the current line/cell has finished execution. This is particularly useful for long tasks. It can make sounds or even make notification bubbles pop up.
IPython bell can be installed as a standard Python package: either from PyPI:
pip install IPythonBell
or from git:
git clone http://github.com/samwhitehall/ipython-bell.git cd ipython-bell/ python setup.py install
This can be imported into an IPython shell session using either: import ipython_bell or %load_ext ipython_bell
Although you probably want it to load when IPython loads, in which case, edit your IPython profile file (by default ~/.ipython/profile_default/ipython_config.py) and add ipython_bell to :
c.TerminalIPythonApp.extensions = [
'ipython_bell'
]
(you may need to create this, and can do so with ipython profile create).
This can be used as a magic for a single line (line magic):
In [1]: %bell print 'hello' hello
or across multiple lines (cell magic):
In[2]: %%bell import time time.sleep(5)
There are four currently available notifiers, selectable with the -n or --notifier arguments:
Specified as follows (in this case, for notify):
In [1]: %bell -n notify print 'hello' hello In[2]: %%bell -n notify import time time.sleep(5)
| Back | FazBrowse Home | New Git URL |