4 ms·
Absolutely awesome! Add tab completion and maybe syntax highlighting and it sounds pretty powerful... One thing I'm missing in interactive interpreters is a wa
by d33 11y ago
Absolutely awesome! Add tab completion and maybe syntax highlighting and it sounds pretty powerful...
One thing I'm missing in interactive interpreters is a way to save code to a file on the fly - testing things and preparing the output file in one go. Does anybody know a solution to this for, say, Python?
- __john 11y agoDo you mean like Jupyter notebooks? http://jupyter.org/ http://jupyter.org/
- smaddox 11y agoNot for Python, but for a lua-like language: terralang.org
- sitkack 11y agoSee also, https://github.com/dibyendumajumdar/ravi https://github.com/dibyendumajumdar/ravi
- vishvananda 11y agoI'm a big fan of bpython[1] for this. F10 copies current session to clipboard, F7 opens it in an external editor, and Ctrl-s saves it to a file. [1]: https://github.com/bpython/bpython https://github.com/bpython/bpython
- srean 11y agoThis has been one of the prominent use case of IPython from the start (now refactored into a language agnostic web based backend: Jupyter).
- amadsen 11y agohttps://root.cern.ch/ https://root.cern.ch/ has tab completion and syntax highlighting. Also scripting support and built in reflection. It integrates with Python and R too, and you can move objects between the languages.
- cohomologo 11y agoHow about the %save magic for ipython? For example "%save mycode.py 1-10" saves the code input on lines 1 through 10 of the session to the file "mycode.py".
- gumby 11y agoJust run it inside Emacs and you'll have a log of everything you do. In fact you could overlay C++ mode on top of shell mode and have syntax highlighting and everything.
- foota 11y agoUse edit -p in ipython (the p is optional) It opens your system editor and then runs the code on save. (-p opens the last edited thing from within the current ipython session)