Automatically play sound in IPython notebook

后端 未结 7 1573
夕颜
夕颜 2020-12-08 02:01

I often run long-running cells in my IPython notebook. I\'d like the notebook to automatically beep or play a sound when the cell is finished executing. Is there some way to

7条回答
  •  离开以前
    2020-12-08 02:46

    My favorite solution (no need for an external module) :

    import os
    os.system("printf '\a'") # or '\7'
    

    Works on OS X.

    However DaveP's remark still apply : it is not the browser playing the sound but the server.

提交回复
热议问题