I have setup Python code completion by installing elpy from Melpa, and it seem to work (mostly) as advertised.
However I want it to also complete the web2py API, and I figured the best way to achieve this is to use the web2py shell, instead of the normal shell.
0th try
Googleing for Emacs, web2py and auto-completion yielded no useful results.
1st try
So I added to my ~/.emacs.d/init.el
file
(setq python-shell-interpreter-args
"/path/to/web2py/web2py.py --plain --import_models --shell=myapp")
... did not work.
2nd try
Following the elpy doc I realize I probably need to customize the elpy-rpc-python-command
variable.
So I wrote this ~/bin/rpc-web2py
script such as:
#!/bin/sh
# note: the $@ need to relate to python becase elpy what's to pass `-W` to it.
python2.7 "$@" /path/to/web2py/web2py.py --shell=myapp --plain --import_models
and customized the Elpy Rpc Python Command to be Other: ~/bin/rpc-web2py
... still no "db." completion.
help
Am I approaching this problem in the right way? I am not committed to any specific code-completion solution, and am willing to have a fresh .emacs.d
if need be.
Was anybody able to have a similar working setup?