Python 3.3在emacs(ropemacs支持) [英] Python 3.3 in emacs (ropemacs support)

查看:126
本文介绍了Python 3.3在emacs(ropemacs支持)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在python中运行arch linux和脚本3.3
我想要IDE的功能(自动完成,语法检查等)。
我已经安装了绳索,绳模和pymacs。 ropemacs是否支持python 3.x?



如果没有,建议替代方法(如果我得到上述功能,我已经准备好考虑vim)。

解决方案

原始的绳库确实支持Py3k根据其网页



  pip install rope_py3k 

或从 PyPi 。目前(1月16日),github项目页面的版本比PyPi更新。



然后从 Pymacs /index.htmlrel =nofollow>其网站。代码似乎也在github 上托管。



最后,

  pip install ropemacs 

或从 PyPi github



特别是, Python 3.3于2012年9月29日发布 最后一次提交到2012年5月25日发布的rope_py3k源代码(截至2014年)。



所以不能显式地支持Python 3.3(与Python 3.2相比)的主要新功能:




  • 收益从一个生成器更容易的委派/转发值

  • 全部ow u'unicode'语法再次(存在于> = Py2.7和
  • IOErrors ,基于类OSError

  • time.perf_counter() et al。具有高的亚秒精度的持续时间

  • stdlib中的新功能:


    • ipaddress

    • lxma (压缩),

    • unittest.mock

    • venv (集成PyPi的virtualenv)




(完整列表检查 Python 3.3发行说明



所以,虽然新的stdlib模块的自动完成, ,新的异常类可能不起作用,最大的障碍可能是 yield 语句的语法。



但是我会怀疑绳索(或任何自动完成的IDE)介绍任何 import ed模块来检查哪些功能/方法/变量可用于自动完成。所以上面所有的都可以(可以说是应该的)工作。



我一定会试一试。没有检测到收益可能不是一个问题。我不是自己的绳索用户,而是因为您的问题而感兴趣。



祝你好运!


I am running arch linux and scripting in python 3.3 I want IDE like features (auto complete, syntax checker etc). I've installed rope, rope-mode and pymacs. Does ropemacs support python 3.x?

If not, suggest alternate ways (I'm ready to consider vim if I get above mentioned features).

解决方案

The original rope library does indeed support Py3k according to its webpage

You

pip install rope_py3k

or download it from PyPi. Currently (Jan '16), the github project page has newer versions than PyPi.

Then you install Pymacs, from its website. The code seems to be hosted on github, too.

Finally,

pip install ropemacs

or download again from PyPi or github.

Particularly, Python 3.3 got released on 29-Sep-2012 after the last commit to the rope_py3k sourcecode which happened on the 25-Jun-2012 (as of 2014).

So the major new features of Python 3.3 (compared to Python 3.2) which are (based on my personal preference) can not be supported explicitly:

  • yield from to easier delegate/forward values from one generator
  • Allow u'unicode' syntax again (existed in >=Py2.7 and
  • Exception hierarchy for IOErrors, based on class OSError
  • time.perf_counter() et al. to time durations with high subsecond precision
  • New in stdlib:
    • ipaddress,
    • lxma (compression),
    • unittest.mock,
    • venv (integrates PyPi's virtualenv)

(For a full list check the Python 3.3 release note)

So, while autocompletion for the new stdlib modules, the new functions, the new exception classes might not work, the biggest stumbling block might be the syntax addition to the yield statement.

But I would suspect that rope (or any auto-completion IDE for that matter) introspects any imported module to check which functions/methods/variables are available for autocompletion. So all of the above might (and arguably should) work.

I'd certainly give it a try. Not having the yield from detected might not be an issue at all. I'm not a user of rope myself, but got interested due to your question.

Good luck!

这篇关于Python 3.3在emacs(ropemacs支持)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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