Emacs mode for Python

John W. Baxter jwbnews at scandaroon.com
Wed Nov 1 19:53:37 EST 2000


In article <8tq9bo$r74$1 at nnrp1.deja.com>, fritzlein at my-deja.com wrote:

> I'm not very experienced with emacs, but I like the way it puts me
> in "C" mode when I edit my file "hello.c", so that the indentation is
> automatically correct.  Is there an emacs mode for python?  If not, is
> there some other mode which handles at least indentation?
> 
> Maybe the first question I should ask is: Does anyone here use emacs
> with python?  What text editor (in a text window) is friendliest to
> python?
> 
Welcome, Fritz:

http://www.python.org/emacs/python-mode/

gives you Python mode...and there are some installation notes nearby.  
(You can install it for your own account or get your system admin folks 
<possibly you> to install it so anyone can use it.)

It's a very pleasant environment (it has a few problems with 
triple-quoted strings, but nothing I haven't been able to get around).  
It indents properly...when it refuses to indent as you expect, there is 
always a reason...missing : on an if or while or def, missing quote, 
etc.  If it won't do what you want, read upwards a line or a few 
lines...you'll find the problem.  It allows you to execute either the 
whole file you're working on or a portion of it with the output going 
into an Emacs window.  And various other nice stuff, some of which I 
haven't found.

I've never run IDLE...I can't compare the two.

  --John

-- 
John W. Baxter   Port Ludlow, WA USA  jwbnews at scandaroon.com



More information about the Python-list mailing list