Take the tour ×

I created following ipython_config.py script for IPython:

c = get_config()
c.TerminalInteractiveShell.editor = 'C:\PROGRA~2\NOTEPA~1\NOTEPA~1.exe'

Now when I %edit some file I get rather unwanted behavior, that is, it starts editing in Notepad++ AND it immediately executes the code. Say:

%edit 'C:/Python27/share/kivy-examples/widgets/textinput.py'

This launches editing textinput.py in Notepad++ (so far so good) and starts this app immediately (not good).

What is even worse is that when I start edit second time, it does fire up N++ but the kivy app can't run again, with this exception:

C:\Python27\lib\site-packages\kivy\core\window\window_pygame.pyc in flip(self)
    218     def flip(self):
--> 219         pygame.display.flip()
    220         super(WindowPygame, self).flip()

error: video system not initialized

How to fix this? That is, I would want IPython to:

  1. wait for N++ to finish editing (say like WinSCP is able to recognize you're done editing with external editor and only then uploads the changed file).

  2. not screw up kivy launching after one run.

share|improve this question
add comment

1 Answer

You need to utilize InteractiveLauncher. Tshirtman also did a small video showcasing how it can be used. All the pitfalls to avoid and further details are mentioned on the documentation page of the feature.

share|improve this answer
add comment

Your Answer


