emacsorphanage / helm-pydoc

pydoc with helm interface
20 stars 5 forks source link

Using ipython as python-shell-interpreter breaks helm-pydoc #12

Open nixmaniack opened 8 years ago

nixmaniack commented 8 years ago

I use ipython as my python-shell-interpreter. When helm-pydoc is invoked, I only get Help on unicode object: in the documentation buffer no matter what I select.

I tried following on command line

$ ipython -m pydoc -- 'datetime.datetime.now'
$ ipython -m pydoc datetime.datetime.now

which produced same Help on unicode object: instead of documentation of now. So it looks like ipython has bug?

Is there any way to fix this with ipython? Or change the interpreter to be python when using helm-pydoc

syohex commented 8 years ago

I cannot reproduce this issue(I used python 3.4.3 and ipython 4.1.2). What python version and ipython version did you use ?

nixmaniack commented 8 years ago

Alright, with following configuration, it doesn't work

$ pyenv --version
pyenv 20160303
$ ipython --version 
4.1.2
$ python --version
Python 2.7.5

Then, I switched to python 3.3.6, and it worked as expected(on command line I tested but wasn't able to test it on emacs with pyenv, another issue at my side)

syohex commented 8 years ago

I cannot reproduce with following versions same as yours.

$ pyenv --version
pyenv 20160303-55-g9c12b30
$ ipython --version
4.1.2
$ python --version
Python 2.7.5
nixmaniack commented 8 years ago

Strange. I am getting same issue on my linux box as well (CentOS 7.2, python 2.7.5, ipython 4.1.2). Previous results were on osx if at all that matters.

In case you can use docker, I pushed a docker image with this bug.

$ docker pull nixmaniack/ipython-pydoc-bug
$ docker run -ti nixmaniack/ipython-pydoc-bug bash

which should drop you in the environment to reproduce.

For now, I'll just modify helm-pydoc locally to use python instead of ipython. Thanks for your help.

syohex commented 8 years ago

Ah sorry I misunderstood. I can reproduce this issue with Python 2(I confirmed 2.7.5-2.7.11).