[Tutor] xemacs on linux - anyone know the settings of .file?
Danny Yoo
dyoo@hkn.eecs.berkeley.edu
Sat, 3 Aug 2002 16:12:54 -0700 (PDT)
On Fri, 2 Aug 2002, Bill Gillespie wrote:
> Does anyone know how to change the xemacs variable for calling "python"
> to something else - like "python2".
>
> When I run my scripts in xemacs - it calls "python" which is version 1.5
> on my redhat system. I'd like to ask for "python2" to run the scripts
> through the newer release of Python.
Hi Bill,
Emacs and XEmacs are programmed in a variant of the Lisp language, and if
you ever feel curious about how python-mode works, we can always look at
the 'python-mode.el' file.
Here the chunk of emacs lisp code that's relevant to your question:
;;;;;; within the 'python-mode.el' emacs lisp file:
(defcustom py-python-command "python"
"*Shell command used to start Python interpreter."
:type 'string
:group 'python)
(defcustom py-jpython-command "jpython"
"*Shell command used to start the JPython interpreter."
:type 'string
:group 'python
:tag "JPython Command")
;;;;;;
These two variables are used to execute Python's shell.
If we want to change the python executable that xemacs calls when we emacs
commands like 'C-c C-!', we can set the following in our personal '.emacs'
configuration file:
;;;
(setq py-python-command "python2")
;;;
Hope this helps!