[IPython-user] Does IPython have a "restart"?

Fernando Perez fperez.net@gmail....
Wed Jul 16 16:30:41 CDT 2008

On Wed, Jul 16, 2008 at 2:03 PM, Dick Moores <rdmoores@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.



More information about the IPython-user mailing list