XEmacs python-mode question

T

Thomas Heller

I'm trying to customize the python interpreter that is used to execute
my scripts from within WinXP, XEmacs, python-mode version
$Revision4.70$, but cannot get it to work.

The only thing that works is M-x customize-group python, and change the
value of 'Python Command'. However, this changes the interpreter for
all buffers, but I want different buffers use different interpreters.
Is that possible?

What I tried so far:

Insert several variants of '#! py23.cmd' at the top of the buffer - no
effect.

Insert this into the buffer - no effect:
## Local Variables:
## py-python-command: "py23"
## End:

Execute "M-x set-variable py-python-command py23" - no effect.

Can anyone help?

Thomas
 
S

skip

Thomas> I'm trying to customize the python interpreter that is used to
Thomas> execute my scripts from within WinXP, XEmacs, python-mode
Thomas> version $Revision4.70$, but cannot get it to work.

Thomas> The only thing that works is M-x customize-group python, and
Thomas> change the value of 'Python Command'. However, this changes the
Thomas> interpreter for all buffers, but I want different buffers use
Thomas> different interpreters. Is that possible?

Thomas,

py-python-command is not buffer local. Try executing

(make-variable-buffer-local 'py-python-command)

and let me know if that allows your Local Variables setting to work.

Skip
 
T

Thomas Heller

Thomas> I'm trying to customize the python interpreter that is used to
Thomas> execute my scripts from within WinXP, XEmacs, python-mode
Thomas> version $Revision4.70$, but cannot get it to work.

Thomas> The only thing that works is M-x customize-group python, and
Thomas> change the value of 'Python Command'. However, this changes the
Thomas> interpreter for all buffers, but I want different buffers use
Thomas> different interpreters. Is that possible?

Thomas,

py-python-command is not buffer local. Try executing

(make-variable-buffer-local 'py-python-command)

and let me know if that allows your Local Variables setting to work.

No, it doesn't work. The only ugly workaround that I found was to use
py-toggle-shells, and create a jython.bat file which invokes the other
interpreter.

Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top