在Emacs中运行Python解释器 [英] Running Python interpreter in Emacs
问题描述
我对在Emacs中运行Python解释器感兴趣。我有Emacs的Python
扩展名,而我的python菜单列出了C-c!作为命令
来运行解释器。然而,当我运行它时,我收到消息Spawning
Child Process:invalid argument。我需要做什么/下载来修复
这个?
我在这个小组的帖子中读了一段时间后有人有这个$。
跟随他的.emacs文件中的行:
(setq interpreter-mode-alist
(cons''(" python" .python-mode)
interpreter-mode-alist))
这与它有关吗?我是否必须将我的加载路径
设置为我的python解释器?
谢谢,
Rex
Rex>我对在Emacs中运行Python解释器感兴趣。我有
雷克斯> Emacs的Python扩展,以及我的python菜单列表C-c! as
雷克斯>运行解释器的命令。然而,当我运行它时,我得到了
雷克斯>消息产生子进程:无效参数。我需要什么
雷克斯>做/下载解决这个问题?
好问题。适用于MacOSX 10.3 w / XEmacs 21.4.15,
python-mode 4.75以及从CVS构建的Python。您能否详细介绍一下
您的环境?
Rex>我读了一下这个小组中的一篇文章,其中有人曾经有人在这里写过了一些文章。
雷克斯>他的.emacs文件中有以下几行:
Rex> (setq interpreter-mode-alist
Rex>(cons''(" python"。python-mode)
Rex> interpreter-mode-alist))
雷克斯>这与它有关吗?
我对此表示怀疑。解释模式 - alist的价值是什么?我默认在我的列表中有
''(python。python-mode)
(作为副作用运行python-mode)。
Rex>我是否必须将我的加载路径设置为我的python解释器?
否。这就是Emacs如何找到要加载的Emacs Lisp文件。确保
" python"命令驻留在PATH上的目录中。
跳过
这就是我所拥有的:
(自动加载''python-mode" python-mode"" Python模式。" t)
(setq auto-mode-alist(追加''((" \\\\\\(py\\)
"。br $>
python-mode))auto-mode-alist))
另外,你总是可以生成一个shell然后调用你的脚本(如果要点是
可以访问输出。)
问候,
Philippe
Rex Eastbourne写道:
我对在Emacs中运行Python解释器很感兴趣。我有Emacs的Python扩展,我的python菜单列出了C-c!。作为命令运行解释器。然而,当我运行它时,我收到消息产生儿童过程:无效的争论。我需要做什么/下载来修复
这个?
我读了一下这个小组中的一篇文章,其中有人在他的.emacs中有以下几行file:
(setq interpreter-mode-alist
(cons''(" python"。python-mode)
interpreter-mode-alist))
这与它有关吗?我是否必须将我的载荷路径设置为我的python解释器?
谢谢,
雷克斯
Hi,
I''m interested in running a Python interpreter in Emacs. I have Python
extensions for Emacs, and my python menu lists "C-c !" as the command
to run the interpreter. Yet when I run it I get the message "Spawning
Child Process: invalid argument." What do I need to do/download to fix
this?
I read in a post in this group from a while back where someone had the
following lines in his .emacs file:
(setq interpreter-mode-alist
(cons ''("python" . python-mode)
interpreter-mode-alist))
Does that have something to do with it? Do I have to set my load-path
to my python interpreter?
Thanks,
Rex
Rex> I''m interested in running a Python interpreter in Emacs. I have
Rex> Python extensions for Emacs, and my python menu lists "C-c !" as
Rex> the command to run the interpreter. Yet when I run it I get the
Rex> message "Spawning Child Process: invalid argument." What do I need
Rex> to do/download to fix this?
Good question. Works fine for me on MacOSX 10.3 w/ XEmacs 21.4.15,
python-mode 4.75 and Python built from CVS. Can you give some details of
your environment?
Rex> I read in a post in this group from a while back where someone had
Rex> the following lines in his .emacs file:
Rex> (setq interpreter-mode-alist
Rex> (cons ''("python" . python-mode)
Rex> interpreter-mode-alist))
Rex> Does that have something to do with it?
I doubt it. What''s the value of interpreter-mode-alist? I have
''("python" . python-mode)
in my list by default (as a side-effect of running python-mode).
Rex> Do I have to set my load-path to my python interpreter?
No. That''s how Emacs finds Emacs Lisp files to load. Make sure the
"python" command resides in a directory on your PATH.
Skip
Hi,
this is what I have:
(autoload ''python-mode "python-mode" "Python mode." t)
(setq auto-mode-alist (append ''(("\\.\\(py\\)
" .
python-mode)) auto-mode-alist))
Plus, you can always spawn a shell then call your script (if the point is to
have access to the output).
Regards,
Philippe
Rex Eastbourne wrote:
Hi,
I''m interested in running a Python interpreter in Emacs. I have Python
extensions for Emacs, and my python menu lists "C-c !" as the command
to run the interpreter. Yet when I run it I get the message "Spawning
Child Process: invalid argument." What do I need to do/download to fix
this?
I read in a post in this group from a while back where someone had the
following lines in his .emacs file:
(setq interpreter-mode-alist
(cons ''("python" . python-mode)
interpreter-mode-alist))
Does that have something to do with it? Do I have to set my load-path
to my python interpreter?
Thanks,
Rex
这篇关于在Emacs中运行Python解释器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!