1

When i use a plain python shell (i hope this terminology is understandable) and then type

import IPython
IPython.start_ipython(["--pylab=qt", "--TerminalInteractiveShell.editor=scite"])

the ipython console starts just like

ipython --pylab=qt --TerminalInteractiveShell.editor=scite

but when i do the same in an already running ipython console, this does not work. Is it possible to 'reset' a running ipython console?

EDIT: I solved my problem now in my own code. Surely presenting my code here will not help anyone. On the given answers (thank you!): Typing

%pylab qt, %
%config TerminalInteractiveShell.editor='scite'

does not throw an error message. However it is NOT the same as

ipython --pylab=qt --TerminalInteractiveShell.editor='scite'

Behaviour is different and my GUI is responsive only in the latter case. I do not know why.

3
  • 1
    You can change config settings with the %config magic, i.e. %config TerminalInteractiveShell.editor='scite'. Commented May 31, 2014 at 19:48
  • I saw those options, but i could not find out how to mimic '--pylab=qt'. I also read somewhere, that this particular option must be set before every other option. Commented Jun 1, 2014 at 8:42
  • 1
    There's a separate %pylab magic to enable pylab mode. Use %pylab qt to make it pick the Qt backend. Commented Jun 1, 2014 at 23:58

1 Answer 1

1

There is an IPython magic command %reset which will clear all variables.

You can see more details and the docstring using %reset?:

Resets the namespace by removing all names defined by the user, if called without arguments, or by removing some types of objects, such as everything currently in IPython's In[] and Out[] containers (see the parameters for details).

Sign up to request clarification or add additional context in comments.

1 Comment

This command unfortunately does not reset sys.modules. And that is the problem here i fear.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.