5 ms·
I feel similarly about autocomplete (particularly the "best way to learn Python" bit) and suggest Python users looking for autocompletion similar to zsh at the
by thomasballinger 11y ago
I feel similarly about autocomplete (particularly the "best way to learn Python" bit) and suggest Python users looking for autocompletion similar to zsh at the command line pip install bpython (which I work on).
See https://github.com/bpython/bpython https://github.com/bpython/bpython for source, http://ballingt.com/bpython-curtsies http://ballingt.com/bpython-curtsies for some (old) gifs.
More generally, build your own tools like this with the excellent Python Prompt Toolkit! (https://github.com/jonathanslenders/python-prompt-toolkit https://github.com/jonathanslenders/python-prompt-toolkit)
- StavrosK 11y agoI'm not sure if it's just me, but I couldn't find a list of shortcut keys in the documentation and I kind of went back to IPython. I think half of it is that the F1 key was bound to help in the terminal, so I couldn't look with that, but you may definitely want to add something to the site to list keys and features.
- thomasballinger 11y agoGreat point, particularly relevant to autocompletion: IPython magics are tab completable and therefore more discoverable than bpython special keys. Real quick, they're emacs-style readline keys but with ctrl-r for undo. F1-F10 do things too. Docs for shortcut keys, for anyone F1 doesn't work for: http://docs.bpython-interpreter.org/configuration.html#keyboard http://docs.bpython-interpreter.org/configuration.html#keybo... The F1 issue with GNOME terminal is frustrating, I agree a cheatsheet-style help page on the site would be good. I've been meaning to do this for a while and might finally get time to work through backlog next week :)
- StavrosK 11y agoThe page you linked technically has all the information I need, but it's hidden among emacs-style movement commands and is a bit cumbersome to read. Consider something like: * F8 - Upload current session to pastebin. * F6 - Reimport everything. * F5 - Watch imports and re-run entire session if one of the imports changes. That would both showcase these fantastic features (I didn't know about them until right now when I tried to write this comment), and allow me to try them right away in the bpython interpreter I have just installed. I had spotted a very nice hotkey that takes you to the source of the function that was being autocompleted but I can't find it again on that page. That's how bad the current page is :P