IronPython + Emacs? [英] IronPython + Emacs?

查看:179
本文介绍了IronPython + Emacs?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我决定进入IronPython,因为我完全在.NET中工作,但需要比C#稍微闷点的东西,以嘲弄快速的东西。 Python一直适用于小事物,一次性测试,这种东西,但是我需要能够获得一些我们的.NET代码。



尽管我完全的厌恶,我一直在使用emacs进行Python编辑,而且我也希望将它用于IronPython,假设有可能。 Google还没有提供资源,所以我想我会看到周围有人知道有没有办法找到这个工作。

解决方案

您可以使用IronPython,就像在Emacs中是标准的Jython解释器一样。



这假设您使用的是 EmacsW32 ,并且您已经安装了 python-mode 从启动板。 (请注意,来自启动板的python模式与emacsw32附带的python模式不同!)



确保您具有 IronPython ,并且您知道其在文件系统上的位置。



打开emacs,然后打开file〜/ .emacs,并添加一行代码,将变量py-jython-command设置为指向IronPython,如下所示。您将要更改以下值



(setq py-jython-commandc:/ Program Files / IronPython 2.0.1 / ipy.exe)



重新启动emacs以确保变量设置正确。



打开一个python文件,点击control-c control- t切换到Jython(IronPython)shell,然后点击control-c!启动shell。



此时您可以使用control-c control-c来执行IronPython中的打开文件的内容,也可以在IronPython内部播放



上面的说明假设您可以安装python-mode,但如果您不知道如何操作,可以添加更多说明。



另外,如果不清楚,我很乐意扩展任何内容。


I've decided to get into IronPython, as I work pretty much exclusively in .NET, but need something a little less stuffy than C# for mocking up quick stuff. Python has been fine for small things, throwaway tests, that sort of stuff, but it's to the point that I need to be able to get to some of our .NET code.

Despite my complete revulsion, I've been using emacs for Python editing, and I'd like to use it for IronPython as well, assuming it's possible. Google has not been forthcoming with resources, so I thought I'd see if anybody around here knew of a way to get that working.

解决方案

You can use IronPython as if it were a standard Jython interpreter in emacs.

This assumes that you are using EmacsW32 and that you have installed python-mode from launchpad. (Note that python-mode from launchpad IS DIFFERENT from the python mode that comes with emacsw32!)

Make sure you have IronPython installed, and you know its location on the filesystem.

Open up emacs, then open the file ~/.emacs and add a line of code that sets the variable py-jython-command to point to IronPython, as below. You'll want to change the value below

(setq py-jython-command "c:/Program Files/IronPython 2.0.1/ipy.exe")

Restart emacs to make sure that variable is set correctly.

Open a python file, hit control-c control-t to toggle to the Jython(IronPython) shell, then hit control-c ! to start up the shell.

At this point you can hit control-c control-c to execute the contents of the open file inside IronPython, or just play around inside IronPython.

The directions above assume that you can install python-mode, but if you don't know how to do that, I can add more instructions.

Also, I'd be happy to expand on any of this if it's unclear.

这篇关于IronPython + Emacs?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆