Emacs做python的编辑器

组里要去python了. 兵马未动, 粮草先行. 趁星期天先把编辑器的工具搞起来. 希望之后做事情能事半功倍. 

虽然很多东西还不知道是啥意思....  以后用到在说. 

参考资料:

1), http://www.emacswiki.org/emacs/?action=browse;oldid=PythonMode;id=PythonProgrammingInEmacs

2), http://www.cnblogs.com/wuhen/articles/1807242.html

 感谢原作者

 

所用工具:

1), emacs  python-mode.el 

     最基本的缩进,等等

2), rope: python 重构的库( 重构到底是啥意思???), 我的最简单的理解是: 能查到python中的类名, 函数名等等... 

3), pymacs:

Pymacs is a powerful tool which, once started from Emacs, allows two-way communication between Emacs Lisp and Python. Pymacs aims to employ Python as an extension language for Emacs rather than the other way around, and this asymmetry is reflected in some design choices. Within Emacs Lisp code, one may load and use Python modules. Python functions may themselves use Emacs services, and handle Emacs Lisp objects kept in Emacs Lisp space.

4), ropemode: 

5), ropemacs: 

 

安装:

rope: http://rope.sf.net/:

   python setup.py install

Pymacs, http://pymacs.progiciels-bpi.ca/pymacs.html

  make; make install;
  之后会生成pymacs.el (这个是emacs 需要的. 放在你能load到的地方) 

ropemode, http://pypi.python.org/pypi/ropemode

  python setup.py install

ropemacs,http://rope.sourceforge.net/ropemacs.html

  python setup.py install

Emacs配置文件:

;;python-mode
(require 'python-mode)
(setq auto-mode-alist (cons '("\\.py$" .  python-mode) auto-mode-alist))
(setq interpreter-mode-alist (cons '("python" .  python-mode) interpreter-mode-alist))

(autoload 'python-mode "python-mode" "Python editing mode." t)

;;rope & pymacs
(require 'pymacs)
(autoload 'pymacs-apply "pymacs")
(autoload 'pymacs-call "pymacs")
(autoload 'pymacs-eval "pymacs" nil t)
(autoload 'pymacs-exec "pymacs" nil t)
(autoload 'pymacs-load "pymacs" nil t)

(pymacs-load "ropemacs" "rope-")
(setq ropemacs-enable-autoimport t)

 

END:

简单的使用就可以了. 比如可以在emacs中打开pyhton 交互环境等等.  

转载于:https://www.cnblogs.com/foreveryl/archive/2011/11/13/2247315.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值