How to run python script in emacs

OdarR olivier.darge at
Wed Oct 7 18:01:47 CEST 2009

On 26 sep, 17:54, devilkin <devilsp... at> wrote:
> I'm just starting learning python, and coding inemacs. I usually
> splitemacswindow into two, coding in one, and run script in the
> other, which is not very convenient. anyone can help me with it? is
> there any tricks likeemacsshort cut?
> also please recommand someemacsplug-ins for python programming, i'm
> also beginner inemacs.currently i'm only using python.el. Are any
> plugins supply code folding and autocomplete?
> BTW, I'm not a english native speaker, any grammer mistakes, please
> correct them. :)


I was not so long ago in the same situation.
I switch to emacs too, why ?
probably because the movement is more natural than in vi (used for 12+
python-mode automatically starts on the machines I'm using, this is
very convenient for *re-indentation* .
Python could be difficult to maintain if you don't have a flexible
text editor.
if you want, i can suggest you some lines for the init file .emacs,
in order to keep the text indented with 4 spaces, no tab at all (very

I also suggest you to have a look on ipython shell, which is a super
shell you keep side the text editor.
once you discover it, you'll understand.

I didn't hear for an autocompletion in emacs.
but ipython has a autocompletion. It can sound weird to auto-complete
outside your editor, but I like it.
you can test little code snippets in ipython, discover the
documentation and methods, and try them.
I discover this clever advice in

currently I work with Mac (Aquamacs), and I was recently on Solaris or
XP as well.
PS: emacs on Mac Terminal with a french keyboard is a bit of a
nightmare considering the META key...:-(
Aquamacs solves this finally.


More information about the Python-list mailing list