[Python-mode] [ python-mode-Bugs-1448154 ] Setting py-python-command after M-x py-shell doesn't work
SourceForge.net
noreply at sourceforge.net
Sun Mar 12 20:35:50 CET 2006
Bugs item #1448154, was opened at 2006-03-12 00:56
Message generated for change (Comment added) made by edloper
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=581349&aid=1448154&group_id=86916
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nicholas Sandow (njsand)
Assigned to: Nobody/Anonymous (nobody)
Summary: Setting py-python-command after M-x py-shell doesn't work
Initial Comment:
If I do M-x py-shell, I get an error:
"Searching for program: no such file or directory, python"
That's ok, I just need to set `py-python-command', right?
(setq py-python-command "c:/python24/python.exe")
Then I do M-x py-shell again, I get the same error message:
"Searching for program: no such file or directory, python"
Why didn't setting py-python-command work?
However, if I switch to another buffer, (actually a
buffer in which I haven't tried M-x py-shell before
setting `py-python-command') M-x py-shell will now work.
----------------------------------------------------------------------
>Comment By: Edward Loper (edloper)
Date: 2006-03-12 14:35
Message:
Logged In: YES
user_id=195958
There's a buffer-local variable "py-which-shell," which is
used to record what shell command you're using (and
also "py-which-args"); this gets initialized the first
time you run py-shell. It appears that the reasoning
behind this has to do with toggling between cpython and
jython, but it's not entirely clear to me from looking at
the code.
One way to make things a little more user friendly would
be to add an initializer function to the defcustom that
defines py-python-command, that calls "(py-toggle-
shells 'cpython)"; but in your case, that wouldn't have
helped, since you directly modified py-python-command
using setq, rather than customize-variable.
If you just want to get things working in that one buffer,
the following should work:
(setq py-python-command "c:/python24/python.exe")
(py-toggle-shells 'cpython)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=581349&aid=1448154&group_id=86916
More information about the Python-mode
mailing list