1 (let ((self-dir (file-name-directory (or load-file-name
2 (when (boundp 'bytecomp-filename) bytecomp-filename)
4 (add-to-list 'load-path self-dir))
6 (load-library "auto-completion")
10 (defun write-file-py-cleanup-imports ()
17 (defun python-init-auto-cleanup-imports-on-save ()
18 (add-hook 'write-file-functions 'write-file-py-cleanup-imports nil t))
20 (add-hook 'python-mode-hook 'python-init-auto-cleanup-imports-on-save)