Running Python interpreter in Emacs

Skip Montanaro skip at
Fri Jun 24 01:00:20 CEST 2005

    Rex> I'm interested in running a Python interpreter in Emacs. I have
    Rex> Python extensions for Emacs, and my python menu lists "C-c !" as
    Rex> the command to run the interpreter. Yet when I run it I get the
    Rex> message "Spawning Child Process: invalid argument." What do I need
    Rex> to do/download to fix this?

Good question.  Works fine for me on MacOSX 10.3 w/ XEmacs 21.4.15,
python-mode 4.75 and Python built from CVS.  Can you give some details of
your environment?

    Rex> I read in a post in this group from a while back where someone had
    Rex> the following lines in his .emacs file:

    Rex>  (setq interpreter-mode-alist
    Rex>         (cons '("python" . python-mode)
    Rex>               interpreter-mode-alist))

    Rex> Does that have something to do with it? 

I doubt it.  What's the value of interpreter-mode-alist?  I have

    '("python" . python-mode)

in my list by default (as a side-effect of running python-mode).

    Rex> Do I have to set my load-path to my python interpreter?

No.  That's how Emacs finds Emacs Lisp files to load.  Make sure the
"python" command resides in a directory on your PATH.


More information about the Python-list mailing list