Could Emacs be rewritten in Python?

Patrick K. O'Brien pobrien at orbtech.com
Sun Apr 6 01:51:39 EST 2003


If you were crazy enough to think that you could create a program
along the lines of Emacs, but written in Python, how would you go
about it?  How would you design the domain model for files, buffers,
windows, and frames?  How would you allow the same level of
customizability?  How would you map functions (or methods or whatever)
to keys?  Any thoughts?

Here is the background.  I'm working on a file editor (called
PyAlaMode) using wxPython and Scintilla.  It's an extension of the
PyCrust code base.  I've got a basic version working, and it supports
editing multiple files and all the usual, basic features.  But I want
it to be as customizable and extensible as Emacs.  In fact, I want to
model it after Emacs, so that elisp code could be rewritten in Python
and work with PyAlaMode.  To do that, I've got to support the same
primitives as Emacs; expose files, buffers, regions, and windows the
same way Emacs does; handle the Emacs keybindings and ability to remap
keys, the same way Emacs does, etc.

Sound like fun?

-- 
Patrick K. O'Brien
Orbtech      http://www.orbtech.com/web/pobrien
-----------------------------------------------
"Your source for Python programming expertise."
-----------------------------------------------




More information about the Python-list mailing list