Bpython is a fancy interface to the Python interpreter
bpython-interpreter.org
bpython-interpreter.org
Also, bpython is a bit buggy when it comes to pasting about a page worth of code/string. In the nice case the syntax highlight gets confused. In the not so nice - it becomes completely unusable, so that I have to kill it.
This is the only good reason I would recommend bpython over IPython objectively. Other than that, it's just a matter of taste - bpython is just a standard shell with some nice features to aid the user whereas IPython has a whole host of features and extensions and integrations that make it a great tool for lots of people. I don't think you have to use one or the other and I don't see them as competing pieces of software. IPython is a great tool and seems to suit a lot of people, particularly those in the mathematic and scientific communities.
Let me put it this way: if IPython implemented all of the features that bpython has and bpython became entirely redundant then I would only be happy that people have a great tool to help them with their development and that bpython may have played a part in helping it get to that state.
The big change from previous versions of ipy.vim is that it no longer requires the old brittle ipy_vimserver.py instantiation, and since it uses just vim and python, it is platform independent (i.e. works even on windows, unlike the previous nix only solution). The requirements are IPython 0.11+ with zeromq capabilities, vim compiled with +python.
And had a moment of panic. As the guy who wrote ipy_vimserver.py (the playing mentioned in my previous post) I am both glad that this awesome project ivanov wrote evolved from it, and horrified that people were using it :). (particularly after searching for ipy_vimserver on google, and finding a lot of issues people were having...)
Cheers.
It might be less so on the "engineering" side due to being perceived as more heavyweight?
(Not that I dislike bpython, just never had the desire to use it)
This one has a curses-based interactive GUI for docs and autocompletion.
IPython has this awesome qtconsole that can show matplotlib plots inline with the code. Then there is its HTML notebook which is probably awesome for presenting stuff.
Even IDLE is pretty cool, actually.
Is stuff like this available for other programming languages? I know Matlab has something vaguely similar to IPython and I think the IPython notebook is inspired by mathematica?
In comparison IRB seems really boring to me. Does Ruby have a cool interpreter? Perl? R?
Technically, it's not another interpreter (like IronPython or Jython), just an interface to the classic CPython REPL.
You can use SLIME with Common Lisp and Clojure which is similar but adds a number of features like hints, docs, and debugging, although it was originally designed for CL so Clojure support is less powerful.
There are definitely Emacs modes like this for other languages, and probably similar plugins or whatever for other editors.
I don't know if it's cool, but I know of at least one alternative to irb: http://pry.github.com/
For Perl I use Devel::REPL (https://metacpan.org/module/Devel::REPL) but there are several others on CPAN (for eg: https://metacpan.org/module/Zoidberg) with varying levels of coolness.
[1] https://bitbucket.org/bobf/bpython/src/2b3fb2cb6500/bpython/...
[2] https://bitbucket.org/bobf/bpython/src/2b3fb2cb6500/bpython/...
[3] http://docs.python.org/library/rlcompleter.html
[4] https://bitbucket.org/bobf/bpython/src/2b3fb2cb6500/bpython/...
The Qt console doesn't require readline, but it does require Qt (and zeromq, and pygments).
with open('path/to/venv/bin/activate_this.py') as fh:
exec(fh.read(), {'__file__' : fh.name})
Actually, having a %workon magic command for virtualenvwrapper[1] users seems like a useful thing. I think I'll write that ...Could you possibly drop me an email or get me on IRC (again, see website for details) to let me know how this curses binary works on Windows ? It'd be great to add some documentation to the bpython site on this.
Edit: setting auto_display_list to False in ~/.bpython/config (not XDG compliant directory :( ) helps a lot. You can then use completion only when you need it.
At least then we know about the problem and can get around to fixing it. :)
I rarely need Arabic bidi support in a shell, and if I do, I tend to copy paste from a proper text editor.
Edit: And I should mention that to my knowledge, KDE's terminal emulator Konsole will render Arabic text correctly as well. However irssi would need to do the alignment part.
One advantage over ipython I see here is that it doesn't use sqlite (I think), so it might run on Heroku.
(because they are right there in the interpreter)
inferior-lisp makes all the problems bpython is trying to solve, irrelevant.
[1] example: http://vimeo.com/22798433 (4 mins)
EDIT: here is a snippet
(defun py-execute-line (&optional async)
"Send the current line to the inferior python process using py-execute-region."
(interactive "P")
(save-excursion
(end-of-line)
(let ((end (point)))
(beginning-of-line)
(py-execute-region (point) end async)))
)
That's the py-execute-line function, which is sending code to py-execute-region defined in python-mode (http://bazaar.launchpad.net/~python-mode-devs/python-mode/py...).For some reason the default python mode in emacs is python.el rather than python-mode.el. So you probably want to start by using python-mode.
Fortunately, IPython, especially with the new --qtconsole, is also very very good.
Note that the tradition is not white on black, but gray on black, because the former has too much contrast which gives it a kind of afterglow effect. Monochrome monitors used to support only a single color, such as blue, orange or green. That's why green on black now has (IMHO silly) "retro" connotations.
And this has nothing to do with, nor provides an alternative to vi/vim.