Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't show IPython kernels in the Python console by default #1860

Closed
spyder-bot opened this issue Feb 17, 2015 · 20 comments
Closed

Don't show IPython kernels in the Python console by default #1860

spyder-bot opened this issue Feb 17, 2015 · 20 comments

Comments

@spyder-bot
Copy link
Collaborator

From contrebasse on 2014-06-20T02:59:24Z

Spyder Version: 2.3.0rc (3802: rc376e27fb117 )
Python Version: 3.4.1
Qt Version : 4.8.6, PySide 1.2.2 on Linux
pyflakes >=0.6.0: 0.7.3 (OK)
pep8 >=0.6 : 1.4.6 (OK)
IPython >=0.13 : 2.1.0 (OK)
pygments >=1.6 : 1.6 (OK)
sphinx >=0.6.6 : 1.2.2 (OK)
psutil >=0.3 : 2.1.1 (OK)
jedi >=0.8.0 : None (NOK)
rope >=0.9.2 : 0.9.4-1 (OK)
matplotlib >=1.0: 1.3.1 (OK)
sympy >=0.7.0 : 0.7.5 (OK)
pylint >=0.25 : 1.2.1 (OK)

What steps will reproduce the problem?

  1. open spyder (I tried resetting the defaults)
    1. Show the Console Tab 3.

What is the expected output? What do you see instead?

I expect to see one python console, but I also have an ipython kernel with the following text:

NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.

To exit, you will have to explicitly quit this process, by either sending
"quit" from a client, or using Ctrl-\ in UNIX-like environments.

To read more about this, see https://github.com/ipython/ipython/issues/2049 To connect another client to this kernel, use:
    --existing kernel-12934.json

Also, while the kernel is cloed if I type "quit" in the corresponding ipython console, if I stop the kernel manually with the topright button I still have to close the ipythonconsole and I can't quit the kernel directly.

So I have 2 problems:

  • Why is the ipython kernel showing up in the python console tab ?
  • Why can't I close the kernel once I killed it ?

Please provide any additional information below

.
I rarely use python interactively so I'm not used to the ipython console, these problems are very misleading for beginners.

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1860

@spyder-bot
Copy link
Collaborator Author

From contrebasse on 2014-06-20T09:17:05Z

Worse use case:

  • Close the ipython panel
  • Kill the kernel
  • It is not possible to close the kernel without reopening the ipython panel

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-06-27T11:10:51Z

I thought we were going to get away with one :) I mean, I don't know why no one raised these concerns before because I'm aware they are really confusing.

About your problems:

  1. IPython kernels are shown in the Python Console pane because we need them there to make the Variable Explorer work for IPython consoles. It's the only possible way to do it right now, given how the Variable Explorer works and the fact that we can't communicate directly with IPython kernels. To alleviate this issue, I'm working to just hide the kernels by default. I hope to have it for 2.3.1.
  2. You can't close the kernel because it still has an IPython console associated with it. So you need to close the IPython console, which will close the kernel automatically.

Labels: MS-v2.3.1

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-08-17T18:52:50Z

Labels: -MS-v2.3.1 MS-v2.3.2

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-08-26T07:57:47Z

issue #1862 has been merged into this issue.

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-08-26T07:58:24Z

Summary: Don't show IPython kernels in the Python console by default (was: Ipython kernel in Python consoles)

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-09-25T03:49:16Z

The idea for this issue is:

  1. Add kernels to the list of external consoles but not as tabs (by default).
  2. Add an action to the External Console menu called "Show IPython kernels" that when clicked will add a tab for each kernel.

Labels: Easy

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-10-31T15:07:53Z

Labels: -MS-v2.3.2 MS-v2.3.3

@spyder-bot
Copy link
Collaborator Author

From [email protected] on 2014-11-01T09:30:14Z

I don't understand why "regular" Python consoles are offered at all (esp. on startup).

It seems to me that IPython is always preferred; I'd rather that Spyder defaults to presenting an iPython console (avoiding the need to do Consoles>Open an IPython console).

Perhaps there's some reason this isn't done that I don't understand (likely!); if so, this is one (of many things) that ought to be mentioned in documentation.

I have only ever used Spyder for serious Python development - I get the sense that many things re Spyder are undocumented because the assumption is that users are already experienced with IPython, etc.

If Spyder gets more popular, this will be less true - many users will start with Spyder as their first Python environment.

To support that, a lot more documentation is needed.

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-11-01T11:31:22Z

I think you're using 2.3.0beta2 (because of your report on issue #2030 ). That release was done almost a year ago, so please update to the latest stable release (2.3.1) because since 2.3.0 the default is opening and focusing an IPython console.

I don't think Python consoles are going to be removed. Many people still use them and prefer them over IPython ones. However, I'll probably hide them by default in 2.4 to not confuse newbies.

I know documentation is lacking, but things improved in 2.3.1 with the addition of a new tutorial and will improve more in 2.4 with the addition of interactive tutorials. If you have time, please help us to improve our rst docs even further (instead of complaining). Right now I'm the only core developer and (unfortunately) my plate is more than full with maintenance, so I don't have time to write docs :-)

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2014-11-18T14:07:01Z

issue #2052 has been merged into this issue.

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2015-01-08T15:10:53Z

Labels: -MS-v2.3.3 MS-v2.3.4

@ccordoba12 ccordoba12 modified the milestones: v2.4, v2.3.4 Mar 11, 2015
@ccordoba12
Copy link
Member

I plan to solve this in the right way for 2.4. If I'd try to do it now, it'd be quite hacky.

@Nodd
Copy link
Contributor

Nodd commented Apr 23, 2015

I think it was said somewhere but I can't find it any more: another idea is to merge the Python console widget and the IPython consoles widget. There would only be one widget with consoles of different types (IPython, standard python, dedicated python).
Even the internal console could be shown here, It would feel more clean but it could be misleading for the unaware user. Maybe set the background as light red to give a clue that it should not be used (this could be done anyway).

@ccordoba12
Copy link
Member

This is not a possibility. The two consoles are very different :-)

@Nodd
Copy link
Contributor

Nodd commented Apr 23, 2015

What is inside the tabs are different, but couldn't they be in the same container?

@ccordoba12
Copy link
Member

Please take a look at the code ;-)

plugins/ipythonconsole has a lot of supporting code to handle kernels, debugging and preferences.

@goanpeca
Copy link
Member

What I find annoying is having the kernel window inside the console windows... it is messy an ugly ..
additional to the ipython console.

We should have a Pane for the internal console (as it is), a pane for Python console (and should be named python console and not have any ipython kernels there..) and we should have a Pane for an Ipython Console (how it is now).

Can we go around not having that Kernel tab inside the console dockwidget @ccordoba12 ?

@Nodd
Copy link
Contributor

Nodd commented Apr 24, 2015

@goanpeca this is the title of the issue 😄

@goanpeca
Copy link
Member

Oops... true :)

@ccordoba12
Copy link
Member

@goanpeca, yes, having kernel widgets inside our Python console is one of the ugliest things in Spyder right now.

Unfortunately, there is no workaround to get rid of that ;-) What we need to do is to talk directly the IPython protocol to connect IPython kernels to the Variable Explorer.

Embedding kernels in the Python console was the easiest and most straightforward way to do that. That's why Pierre did it 4 years ago :-) But I plan to change that in Spyder 3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants