3 ms·
is there a good emacs-mode for python that gives interactive development of the same level as inferior-lisp[1]? the python-modes i've seen only let you re-execu
by dustingetz 14y ago
is there a good emacs-mode for python that gives interactive development of the same level as inferior-lisp[1]? the python-modes i've seen only let you re-execute a file, but not a buffer or expression.
inferior-lisp makes all the problems bpython is trying to solve, irrelevant.
[1] example: http://vimeo.com/22798433 http://vimeo.com/22798433 (4 mins)
- RBerenguel 14y agoStandard 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?
- ramanujan 14y agoI 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/python-mode/view/head:/python-mode.el#L7828 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.