| @ -1,49 +0,0 @@ | |||||
| # Elpy, the Emacs Lisp Python Environment | |||||
| Elpy is an Emacs package to bring powerful Python editing to Emacs. It | |||||
| combines a number of other packages, both written in Emacs Lisp as | |||||
| well as Python. | |||||
| [](http://travis-ci.org/jorgenschaefer/elpy) | |||||
| ## Documentation | |||||
| You can find the documentation [on the wiki][wiki]. | |||||
| [wiki]: https://github.com/jorgenschaefer/elpy/wiki | |||||
| ## Quick Installation | |||||
| You can also read the [detailed installation instructions][Installation]. | |||||
| [Installation]: https://github.com/jorgenschaefer/elpy/wiki/Installation | |||||
| First, install the required Python packages: | |||||
| ``` | |||||
| pip install elpy rope pyflakes pep8 | |||||
| ``` | |||||
| (Note: If you are installing the development version of elpy, do not | |||||
| install the elpy Python package, but simply put the repository in your | |||||
| `PYTHONPATH`.) | |||||
| Evaluate this in your `*scratch*` buffer: | |||||
| ```Lisp | |||||
| (add-to-list 'package-archives | |||||
| '("marmalade" . "http://marmalade-repo.org/packages/")) | |||||
| ``` | |||||
| Then run `M-x package-refresh-contents` to load the contents of the | |||||
| new repository, and `M-x package-install RET elpy RET` to install | |||||
| elpy. | |||||
| Finally, add the following to your `.emacs`: | |||||
| ```Lisp | |||||
| (package-initialize) | |||||
| (elpy-enable) | |||||
| ``` | |||||
| Done. | |||||
| @ -0,0 +1,57 @@ | |||||
| ======================================= | |||||
| Elpy, the Emacs Lisp Python Environment | |||||
| ======================================= | |||||
| Elpy is an Emacs package to bring powerful Python editing to Emacs. It | |||||
| combines a number of other packages, both written in Emacs Lisp as | |||||
| well as Python. | |||||
| .. image:: https://secure.travis-ci.org/jorgenschaefer/elpy.png | |||||
| :alt: Build Status | |||||
| :target: http://travis-ci.org/jorgenschaefer/elpy | |||||
| :width: 77px | |||||
| :height: 19px | |||||
| Documentation | |||||
| ============= | |||||
| You can find the documentation `on the wiki`__. | |||||
| .. __: https://github.com/jorgenschaefer/elpy/wiki | |||||
| Quick Installation | |||||
| ================== | |||||
| You can also read the `detailed installation instructions`__. | |||||
| .. __: https://github.com/jorgenschaefer/elpy/wiki/Installation | |||||
| First, install the required Python packages::: | |||||
| pip install elpy rope | |||||
| (Note: If you are installing the development version of elpy, do not | |||||
| install the elpy Python package, but simply put the repository in your | |||||
| ``PYTHONPATH``.) | |||||
| Evaluate this in your ``*scratch*`` buffer: | |||||
| .. code-block:: lisp | |||||
| (require 'package) | |||||
| (add-to-list 'package-archives | |||||
| '("marmalade" . "http://marmalade-repo.org/packages/")) | |||||
| Then run ``M-x package-refresh-contents`` to load the contents of the | |||||
| new repository, and ``M-x package-install RET elpy RET`` to install | |||||
| elpy. | |||||
| Finally, add the following to your ``.emacs``: | |||||
| .. code-block:: lisp | |||||
| (package-initialize) | |||||
| (elpy-enable) | |||||
| Done. | |||||
| @ -0,0 +1,10 @@ | |||||
| # -*- mode: snippet -*- | |||||
| # name: __enter__ | |||||
| # key: __enter__ | |||||
| # expand-env: ((yas-indent-line nil)) | |||||
| # -- | |||||
| __enter__(self): | |||||
| $1 | |||||
| def __exit__(self, exc_type, exc_value, traceback): | |||||
| $2 | |||||
| @ -0,0 +1,6 @@ | |||||
| # -*- mode: snippet -*- | |||||
| # name: __exit__ | |||||
| # key: __exit__ | |||||
| # -- | |||||
| __exit__(self, exc_type, exc_value, traceback): | |||||
| $0 | |||||
| @ -0,0 +1,7 @@ | |||||
| # -*- mode: snippet -*- | |||||
| # name: super | |||||
| # key: super | |||||
| # expand-env: ((class (lambda () (let ((info (python-info-current-defun))) (if info (car (split-string info "\\.")) "class")))) (method (lambda () (let ((info (python-info-current-defun))) (if info (cadr (split-string info "\\.")) "method")))) (object (lambda () (if (and (python-nav-beginning-of-defun) (re-search-forward "(\\([^),=]*\\)" nil t)) (match-string-no-properties 1) "self")))) | |||||
| # -- | |||||
| super(`(funcall class)`, `(funcall object)`).`(funcall method)`($1) | |||||
| $0 | |||||