migrated #779839 from python project.
Original Submission:
The rest of this report is a quote from Skip's message
in
c.l.py.
Attached is Skip's tentative patch (which is likely
incorrect for Jython).
---------------------------------
John> 1. Why do I get this in my minibuffer when
I do
John> C-c C-c in a python-mode buffer containing
the
John> following valid Python code?
John> Wrong type argument: sequencep, cpython
It looks like a bug in py-execute-region. It sets the
shell
variable like so:
(setq shell (or (py-choose-shell-by-shebang)
(py-choose-shell-by-import) py-which-shell))))
which gives it the value (quote cpython). Later on it
tries
to concatenate it:
(let ((cmd (concat shell (if (string-equal
py-which-bufname "JPython") " -" ""))))
which fails because shell is not a string (strictly
speaking, a sequence) at that point. I'm not sure
what
the correct fix is.
Logged In: YES
user_id=52548
I think what we want here is:
--- /usr/share/emacs/site-lisp/python-mode/python-mode.el
2004-03-06 01:16:19.000000000 -0600
+++ lib/elisp/python-mode.el 2004-09-13
16:25:17.000000000 -0500
@@ -1686,7 +1686,7 @@
(setq py-exception-buffer (cons file (current-buffer))))
(t
;; TBD: a horrible hack, but why create new Custom
variables?
- (let ((cmd (concat shell (if (string-equal
py-which-bufname "JPython")
+ (let ((cmd (concat py-which-shell (if (string-equal
py-which-bufname "JPython")
" -" ""))))
;; otherwise either run it synchronously in a subprocess
(save-excursion
Logged In: YES
user_id=44345
Applied Ted Whalen's patch (v 4.66 of python-mode.el).
I can't test - Jythoneers, here's your chance...