Is there a way to make an audible noise when a computation is complete?
I tried printing the alert bell ("\a") and didn't hear anything. Tips?
Are you using a remote notebook or a local server. If it is local, just run some local command that makes a noise using os.system. How you do this depends entirely one what operating system you are using.
Regarding email (see ccanonc's remark above), it is trivial to use with Sage, irregardless of SMTP. There is a command (I wrote) called "email" that is builtin to Sage, which uses that Sage includes its own mail server (which is part of Twisted). Just do
sage: email? for more details.
You can try this on any new browser.
def done(): return html('!audio src="http://www.radokirov.com/gong.ogg" autoplay> Your browser does not support the
audioelement. !/audio>') for i in range(10**6): pass done()
Replace ! with < . I could not make the code display otherwise.
In the future a function "done()" along with a sound file can be a part of the notebook. I will remove the .ogg file from my server in the future to prevent too much hotlinking (so don't freak out if this doesn't work).
I added gong.ogg to my notebook, so I can serve it locally. It took a while, but I finally determined the path to the image files:
The URI to the file is:
The file plays fine in Firefox; guess Safari doesn't know how to play an ogg file.
Asked: 2010-08-21 03:40:34 -0500
Seen: 627 times
Last updated: Aug 24 '10