简体   繁体   English

Emacs 24中的Python Shell?

[英]Python Shell in Emacs 24?

I recently upgraded from Emacs 23 to Emacs 24. Since the upgrade, it seems that I've lost the ability to call "Mx python-shell" (!). 我最近从Emacs 23升级到Emacs 24.自升级以来,我似乎失去了调用“Mx python-shell”(!)的能力。

What happened? 发生了什么? Does the included python mode no longer ship with this functionality? 包含的python模式是否不再附带此功能?

Using Emacs 23: 使用Emacs 23:

○ /usr/local/bin/emacs -Q

Describe function: python-shell
    python-shell is an interactive autoloaded Lisp function in
    `python.el'.

Using Emacs 24: 使用Emacs 24:

○ /Applications/Emacs.app/Contents/MacOS/Emacs -Q

Describe function: python-shell [No match]

It seems like you only solved the python-mode issue. 看起来你只解决了python-mode问题。 As to Mx-python-shell you can also get this by doing Mx-run-python . 对于Mx-python-shell您也可以通过执行Mx-run-python If it says directory not found its because the the python variable is not pointing to the correct path. 如果它说目录找不到它,因为python变量没有指向正确的路径。 So do Chf run-python then it will tell you that run-python's value is python-shell-interpreter. 那么Chf run-python就会告诉你run-python的值是python-shell-interpreter。 So then point it to python.exe in your python folder. 然后将它指向python文件夹中的python.exe。

add this to your .emacs file 将其添加到.emacs文件中

(setq python-shell-interpreter "path to python.exe")

Then like in emacs 23 you can do CcCc to run a .py file. 然后就像在emacs 23中一样,您可以使用CcCc来运行.py文件。

edit-the reason i have all of this here even though you may already of known this is because i didnt realize that emacs24 changed the python value for run-python for a while and this is how i fixed it. 编辑 - 我在这里所有这一切的原因,即使你可能已经知道这是因为我没有意识到emacs24改变了run-python的python值一段时间,这就是我如何修复它。 :D :d

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM