Manage Python imports from Emacs!
Installation: install from MELPA, or add pyimport.el to your
load-path
.
Requires pyflakes to be installed.
Run M-x pyimport-remove-unused
.
This requires pyflakes
to be on PATH
. Alternatively, set
pyimport-pyflakes-path
.
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:
(define-key python-mode-map (kbd "C-c C-i") #'pyimport-insert-missing)