3 ms·
This is actually brilliant. It fixes my (relatively minor) gripes with the standard iPython front-end. Namely the multiline mode is miles better, so so much bet
by aidos 12y ago
This is actually brilliant. It fixes my (relatively minor) gripes with the standard iPython front-end. Namely the multiline mode is miles better, so so much better.
Already mentioned on the thread somewhere else is an issue with autocompletion on imported modules, but that sounds like a bug that will be fixed.
I'm using the ipython mode and there are a couple of differences. For example I'm used to typing 'hist -l 100' to see the recent history, now I need to use the magic ipython variant '%hist -l 100'. Not a big deal, just slightly different behaviour.
The vi-mode is actually not too bad. For me it's good enough to be used in this context. Would be great if it was more complete (eg, daw doesn't work). Maybe it could make use of neovim at some point?
I LOVE that a syntax error means the line isn't flushed so you can fix the issue and hit enter to execute it again. That's a really smart enhancement that I hadn't even noticed was a total waste of time in my workflow until now.
Does it read my local iPython config profile? I use auto-reloading heavily for hot code swapping during my development, will that still work?
Edit: just tested and the iPython auto-reloading isn't working. Maybe it needs to be converted to run as a front-end to get the full power of iPython?
Also, needed to do PYTHONPATH=. ptipython --vi to be able to load modules from the directory in which I started the app.
- jonathan_s 12y agoThanks for the feedback. About "daw": it looks like I forgot about that. To be fixed, but right now use "diw" instead. (Please create a github issue if there are some other important key bindings missing.) At the moment, I don't know yet about auto-reloading in IPython, but that's worth looking at. About the PYTHONPATH, that's easy to fix. (Should we always add the current directory to the path in a REPL?)
- PythonicAlpha 12y ago(Should we always add the current directory to the path in a REPL?) Yes, of course! That was my first problem. The standard "python" always has the current directory in the module path. Please also have a look on my suggestion for the search facility: https://news.ycombinator.com/item?id=8391647 https://news.ycombinator.com/item?id=8391647 It would be really helpful, to just search for some keyword and have the last occurence (for example import) as template without the need for going back the history by hand.
- jonathan_s 12y ago>> It would be really helpful, to just search for some keyword and have the last occurence... In Vi-mode, use ControlX-ControlL after typing the start of the line, then you have line based completion, which also completes from the history.
- crucialfelix 12y ago> For example I'm used to typing 'hist -l 100' to see the recent history, now I need to use the magic ipython variant '%hist -l 100'. I'll take that any day over list (the type) vs list (the ipython command) confusion and not being able to use various single letter variables