problem starting python interpreter in emacs (win98)

selwyn selwyn at home.net.nz
Tue Apr 22 02:25:08 EDT 2003


system: win98
python version 2.2.2
emacs  21.2.1
..........
hi all,

I am having diffculty getting the python interpreter to run under emacs,
either from the menu or with C-c ! Syntax highlighting and .py file 
recognition works fine.

When I try strating the interpreter with the above Emacs complains:
"Searching for program: No such  file or directory, python"

I have set the environment variable  HOME to C:\ which is where .emacs
resides, and I have byte compiled python-mode.el which sits in C:\Python22

My .emacs file is as follows:

(setq load-path (cons "C:\Python22" load-path))
(setq auto-mode-alist
        (cons '("\\.py$" . python-mode) auto-mode-alist))
(setq interpreter-mode-alist
        (cons '("python" . python-mode)
              interpreter-mode-alist))
(autoload 'python-mode "python-mode" "Python editing mode." t)
(global-font-lock-mode t)
(setq font-lock-maximum-decoration t)

(require 'cua)
(CUA-mode t)

..........
I guessed that (setq interpreter-mode-alist...etc is telling Emacs where
the interpreter is located, and so I tried adjusting the value of
"python" to "C:\Python22\python" and "C:\Python22\python.exe".

However I am slightly confused about when Emacs reloads .emacs. Do I
have to restart windows everytime I make a change, or is there a method
for reloading while Emacs is running?

Any help greatly appreciated.

Cheers,
Selwyn







More information about the Python-list mailing list