jorgenschaefer / elpy

Emacs Python Development Environment
GNU General Public License v3.0
1.89k stars 260 forks source link

Multiples prompts on Python Shell #896

Open humitos opened 8 years ago

humitos commented 8 years ago

I don't know, but when I press C-c C-z to open a Python interactive shell I get this:

Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> >>> >>> >>> 

The issue here is that 4 prompts are printed there.

If I do M-x elpy-uses-ipython I get this:

Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
Type "copyright", "credits" or "license" for more information.

IPython 4.2.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: 
In [2]: 
In [3]: 
In [4]: 

Do you know why?

Maybe it's related with: https://github.com/jorgenschaefer/elpy/issues/733

Just in case, all my settings are at: https://github.com/humitos/emacs-configuration

ChillarAnand commented 8 years ago

Keen observation :-)

This seems like a bug in emacs itself.

jorgenschaefer commented 8 years ago

Indeed. Emacs sends some initialization code (mainly to allow tab completion) to the Python interpreter, which results in those extraneous prompts.