Re:Bpython is a fancy interface to the Python interpreter
by ramanujan on Sunday May 20, 2012 @09:01PM
(#4000794)
I patched python-mode to do this (also did something similar for node and a few other interpreters). Main thing is to add a "py-execute-line" routine and a few others as wrappers around the file execution code. If there's interest, might post as open source.
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.
Re:Bpython is a fancy interface to the Python interpreter
by RBerenguel on Monday May 21, 2012 @09:54AM
(#4002816)
Standard python mode has also region evaluation and definition evaluation, which mostly account for that. Maybe I'm missing something here? What do you want from inferior-lisp that you don't have in python?
inferior-lisp makes all the problems bpython is trying to solve, irrelevant.
[1] example: http://vimeo.com/22798433 (4 mins)