How do I get IPython to notify me when a command has been executed? Can I get it to use the bell/alert, or by pop-up? I'm running Anaconda on iTerm on OS X 10.8.5.
Running the CommandThe shell makes a copy of itself, a process called forking. This copy of the shell replaces itself with the command, with all of the arguments that were processed earlier. This is known as an "exec," and the combined process is known as "fork-and-exec."
The & makes the command run in the background. From man bash : If a command is terminated by the control operator &, the shell executes the command in the background in a subshell.
Finally someone created a nice library for it.
You just install it:
pip install jupyternotify
Import it in your notebook:
import jupyternotify
ip = get_ipython()
ip.register_magics(jupyternotify.JupyterNotifyMagics)
and use a magic command:
%%notify
import time
time.sleep(5)
and get a nice notification:
Git-page also shows how to load it automatically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With