Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Wilfred/pyimport
Manage Python imports from Emacs!
https://github.com/Wilfred/pyimport
emacs import python
Last synced: 3 months ago
JSON representation
Manage Python imports from Emacs!
- Host: GitHub
- URL: https://github.com/Wilfred/pyimport
- Owner: Wilfred
- Created: 2016-06-25T18:40:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-02-07T07:19:55.000Z (9 months ago)
- Last Synced: 2024-04-26T01:33:36.444Z (7 months ago)
- Topics: emacs, import, python
- Language: Emacs Lisp
- Size: 126 KB
- Stars: 75
- Watchers: 7
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# pyimport
*Manage Python imports from Emacs!*
[![Build Status](https://travis-ci.org/Wilfred/pyimport.svg?branch=master)](https://travis-ci.org/Wilfred/pyimport)
[![Coverage Status](https://coveralls.io/repos/github/Wilfred/pyimport/badge.svg?branch=master)](https://coveralls.io/github/Wilfred/pyimport?branch=master)
[![MELPA](http://melpa.org/packages/pyimport-badge.svg)](http://melpa.org/#/pyimport)Installation: install from MELPA, or add pyimport.el to your
`load-path`.## Unused Imports
Requires pyflakes to be installed.
![screenshot](remove_unused.gif)
Run `M-x pyimport-remove-unused`.
This requires `pyflakes` to be on `PATH`. Alternatively, set
`pyimport-pyflakes-path`.## Insert Missing Imports
![screenshot](insert_missing.gif)
Place point on the missing variable, then run
`M-x pyimport-insert-missing`.This assumes that you have another Python buffer that contains an
example of importing the variable.I like to bind this to a key:
```emacs-lisp
(define-key python-mode-map (kbd "C-c C-i") #'pyimport-insert-missing)
```