My py-python-command is set to c:\Program
Files\Python24\python.exe
If I call py-execute-region I get an error buffer
saying that c:\Program is not found. If I start an an
interpreter using py-shell first then all is well.
The custom variable py-python-command does double duty
to both launch the interpreter and process a region.
(This is via the py-which-shell intermediate.) If I
surround the command with double quotes, then py-
execute-region works but py-shell does not as it adds
an extra set of quotes.
My suggested patch supplies the extra quoting needed by
py-execute-region.
I'm using python-mode 1.0, XEmacs 21.5.17 native, XP
Home SP2, Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC
v.1310 32 bit (Intel)] on win32.
*** c:\Program Files\XEmacs\site-packages\lisp\python-
mode-1.0\python-mode.el.orig Fri Dec 2 16:30:11 2005
--- c:\Program Files\XEmacs\site-packages\lisp\python-
mode-1.0\python-mode.el Tue Jan 17 20:38:28 2006
***************
*** 1756,1764 ****
(setq py-exception-buffer (cons file (current-
buffer))))
(t
;; TBD: a horrible hack, but why create new
Custom variables?
! (let ((cmd (concat py-which-shell (if (string-
equal py-which-bufname
! "Jython")
! " -" ""))))
;; otherwise either run it synchronously in a
subprocess
(save-excursion
(set-buffer buf)
--- 1756,1764 ----
(setq py-exception-buffer (cons file (current-
buffer))))
(t
;; TBD: a horrible hack, but why create new
Custom variables?
! (let ((cmd (concat (shell-quote-argument py-
which-shell)
! (if (string-equal py-which-
bufname "Jython")
! " -" ""))))
;; otherwise either run it synchronously in a
subprocess
(save-excursion
(set-buffer buf)
Candidate patch, web form mangled the first go