16 Jul 23:30
Re: Does IPython have a "restart"?
From: Fernando Perez <fperez.net <at> gmail.com>
Subject: Re: Does IPython have a "restart"?
Newsgroups: gmane.comp.python.ipython.user
Date: 2008-07-16 21:30:41 GMT
Subject: Re: Does IPython have a "restart"?
Newsgroups: gmane.comp.python.ipython.user
Date: 2008-07-16 21:30:41 GMT
On Wed, Jul 16, 2008 at 2:03 PM, Dick Moores <rdmoores <at> gmail.com> wrote: > I mean something equivalent to what you get when you do a Ctrl+F6 in IDLE: Use %reset: In [1]: import math In [2]: math.sin(3) Out[2]: 0.14112000805986721 In [3]: %reset Once deleted, variables cannot be recovered. Proceed (y/[n])? y In [5]: math.sin(3) --------------------------------------------------------------------------- NameError Traceback (most recent call last) /home/fperez/Desktop/≤ipython console> in <module>() NameError: name 'math' is not defined Note that it is NOT the same though: idle forces a new, fresh python process, while ipython just clears your current variables. So things like reloading extension modules won't work the same way. Cheers, f
RSS Feed