Ask Your Question

Revision history [back]

A clean thing to do is to look at the file $HOME/.sage/sage_notebook.sagenb/twistd.pid and kill the process with that PID. You can type this command to do this all in one line:

kill `cat $HOME/.sage/sage_notebook.sagenb/twistd.pid`

You can make a shell script with the above line if you wanted. Or you could do this from in Sage:

os.system("kill `cat $HOME/.sage/sage_notebook.sagenb/twistd.pid`")