https://github.com/Wilfred/pyimport
Manage Python imports from Emacs!
https://github.com/Wilfred/pyimport
emacs import python
Last synced: about 2 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 (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-02-07T07:19:55.000Z (over 1 year ago)
- Last Synced: 2025-04-15T01:28:26.750Z (3 months ago)
- Topics: emacs, import, python
- Language: Emacs Lisp
- Size: 126 KB
- Stars: 75
- Watchers: 6
- 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!*
[](https://travis-ci.org/Wilfred/pyimport)
[](https://coveralls.io/github/Wilfred/pyimport?branch=master)
[](http://melpa.org/#/pyimport)Installation: install from MELPA, or add pyimport.el to your
`load-path`.## Unused Imports
Requires pyflakes to be installed.

Run `M-x pyimport-remove-unused`.
This requires `pyflakes` to be on `PATH`. Alternatively, set
`pyimport-pyflakes-path`.## Insert Missing Imports

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)
```