You can clone with
i have completion with TAB in shell by running ipython but in emacs when i run py-shell I have no completion
for example when I enter import[TAB] it says: can't find completion for "import"
i also imported rlcompleter2 but it doesn't work again!
i installed latest ipython version from the git repository
i tested both in emacs23 and emacs24(from git) [doesn't work]
It's still working for me sort of.
It does not appear to find the packages when trying to complete import
i.e. doing import sci[tab] does not find scipy and doing import [tab] gives import --------------------------------------------------.
But it works fine for completing functions of imported packages and also completes variables correctly.
It could be improved however as the ipython history will end up with a lot of stuff like:print(';'.join(get_ipython().Completer.all_completions('sci'))) #PYTHON-MODE SILENT
when completing in the emacs shell.
print(';'.join(get_ipython().Completer.all_completions('sci'))) #PYTHON-MODE SILENT
it doesn't work for me! also for function completion!also simple codes
for example :
is your ipython version or ipython.el in the latest version?!!
if not, can you send me your ipython and ipython.el?
It's the latest version. I think that you also need python-mode.el (This is not the default python mode in emacs)
I am using version 5.20. (I have not tested the newest version but I guess it works)
The relevant part of my .emacs file to make it work is:
(autoload 'python-mode "python-mode" "Python Mode." t)
(setq auto-mode-alist (cons '("\\.py$" . python-mode) auto-mode-alist))
(setq interpreter-mode-alist (cons '("python" . python-mode)
(autoload 'python-mode "python-mode" "Python editing mode." t)
;; In XEmacs syntax highlighting should be enabled automatically. In GNU
;; Emacs you may have to add these lines to your init file:
(setq font-lock-maximum-decoration t)
(setq py-python-command-args '("--pylab=qt" "--colors=LightBG"))
(global-set-key [C-tab] 'ipython-complete) ;```
i upgraded python-mode
now it says: py-shell::
Unknown option: --
usage: /usr/bin/python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
Process Python exited abnormally with code 2
I don't know what's happening
Ok I see the same problem with the newest version of
python-mode try version 5.2 from here:https://launchpad.net/python-mode/+download
That seems to work for me.
Thank you so much
this version of python-mode works with ipython! i'm enjoying writing python in emacs :)
Just for the record. There seems to be bugs in new versions of python-mode see:https://bugs.launchpad.net/python-mode/+bug/835151
The value of py-python-command is ignored.
so standard python is launched instead of ipython
As a workaround if you want to use the newest version of python-mode.el you can set (setq py-default-interpreter "ipython") in your .emacs file
(setq py-default-interpreter "ipython")
Ok the new version seems seems to give other problems with tab indention as well.
I will not investigate it further until there is a new version of python-mode.el that fixes the first problem.