3 ms·
3 seconds includes closing AND starting the IPython shell. Typing "exit" or ctrl + d + return adds a little time and is generally annoying. The builtin Python
by bjpless 14y ago
3 seconds includes closing AND starting the IPython shell. Typing "exit" or ctrl + d + return adds a little time and is generally annoying.
The builtin Python shell is admittedly faster to start/stop but IPython's features rock.
- JulianWasTaken 14y agoAh, OK, fair enough. FWIW you might also like checking out https://github.com/ludios/Pyquitter https://github.com/ludios/Pyquitter. I use it occasionally when I want something like this, you could rig it to start iPython's main(). It also doesn't use inotify but that'd be fairly trivial to add.
- bjpless 14y agoAh I like it, thanks. From a quick glance, it seems like it just restarts the entire child process on change. The big (but admittedly) dangerous feature of my script is that you can maintain state inside of the embedded shell on module reload. I like pyquitter looks like a cool generalization, though, of the basic idea.