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)
217
218 def flip(self):
--> 219 pygame.display.flip()
220 super(WindowPygame, self).flip()
221
error: video system not initialized
How to fix this? That is, I would want IPython to:
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).
not screw up kivy launching after one run.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With