spacemacs/layers/+lang/python/local/pylookup
Maximilian Wolff 6d40ee8e10 Revert "python: replaced local package pylookup with the one on github"
This reverts commit 6e0f650101.
The reason for this is not that the dynamically build pylookup.py
is not found by emacs, this I have already solved locally by checking
the quelpa build directory.

However the issue is that the library is not compatible with python 3
the local version however is.

So this is effectively a fork and must be kept till python 3
compatibility for pylookup has been achieved.

Should fix #14544
2021-03-21 09:53:13 +00:00
..
.gitignore Revert "python: replaced local package pylookup with the one on github" 2021-03-21 09:53:13 +00:00
makefile Revert "python: replaced local package pylookup with the one on github" 2021-03-21 09:53:13 +00:00
pylookup.el Revert "python: replaced local package pylookup with the one on github" 2021-03-21 09:53:13 +00:00
pylookup.py Revert "python: replaced local package pylookup with the one on github" 2021-03-21 09:53:13 +00:00
README.md Revert "python: replaced local package pylookup with the one on github" 2021-03-21 09:53:13 +00:00

Author

Taesoo Kim (taesoo@mit.edu)

Michael Markert (markert.michael@gmail.com) Austin Bingham (austin.bingham@gmail.com) Takafumi Arakaki aka.tkf@gmail.com

README

Pylookup stole idea from 'http://furius.ca/haddoc', one of my favorite emacs mode for python documentation lookup. I reimplemented python code and elisp code not just to support new version of python 2.7 but also to extend it for other documentation lookup interfaces with easy. Importantly, pylookup mode is much faster and supports fancy highlighting.

Please check, Web : http://taesoo.org/proj/pylookup.html Repo : https://github.com/tsgates/pylookup

INSTALL

Create database

You can browse python documents from either online or offline. Since I prefer offline, here is an easy step:

 make download

It will download python document, and construct database for you. If you get in any trouble, follow the below steps manually:

  1. Download your own version of python document (i.e. http://docs.python.org/archives/python-2.7.2-docs-html.zip)
  2. Unzip: 'unzip python-2.7.2-docs-html.zip'
  3. Index: './pylookup.py -u python-2.7.1-docs-html'
  4. Test : './pylookup.py -l ljust'

(see updateing database section for more options)

Elisp

Here is lisp part for emacs.

  • [PATH] parameter depends on your environment (i.e. "~/.emacs.d/pylookup")
;; add pylookup to your loadpath, ex) ~/.emacs.d/pylookup
(setq pylookup-dir "[PATH]")
(add-to-list 'load-path pylookup-dir)

;; load pylookup when compile time
(eval-when-compile (require 'pylookup))

;; set executable file and db file
(setq pylookup-program (concat pylookup-dir "/pylookup.py"))
(setq pylookup-db-file (concat pylookup-dir "/pylookup.db"))

;; set search option if you want
;; (setq pylookup-search-options '("--insensitive" "0" "--desc" "0"))

;; to speedup, just load it on demand
(autoload 'pylookup-lookup "pylookup"
  "Lookup SEARCH-TERM in the Python HTML indexes." t)

(autoload 'pylookup-update "pylookup"
  "Run pylookup-update and create the database at `pylookup-db-file'." t)

Updating Databases

You can easily accumulate many sources into single database. For example, you can index python and scipy at the same time. Here are the examples:

You probably like to type './pylookup.py -h' to see more options.