[IPython-dev] kernel restart
Wed Jun 20 23:28:51 CDT 2012
On Wed, Jun 20, 2012 at 9:09 PM, Bob McElrath <email@example.com>wrote:
> Very dumb question, but what do I have to type into a cell to restart the
> I like to put restart(); (Maple) in the first cell of my worksheet so it's
> to re-run everything cleanly.
> A %restart magic would be very useful.
All code in cells runs on the kernel, and the kernel cannot restart itself.
Restart involves killing the kernel, and logically enough, a kernel cannot
start up again *after* it has killed itself.
If you want to clean the namespace and not halt the whole process, this is
what %reset is for.
If you want a convenient mechanism to restart kernels, there is the
keyboard shortcut: ^M-. (control-M, period) which will restart the kernel.
If you do `exit` in a cell, the kernel will halt, which will trigger a
restart *by the server*.
> Cheers, Bob McElrath
> "The individual has always had to struggle to keep from being overwhelmed
> the tribe. If you try it, you will be lonely often, and sometimes
> But no price is too high to pay for the privilege of owning yourself."
> -- Friedrich Nietzsche
> IPython-dev mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev