-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Plotting is not working in the console for Ipython 0.11 and 0.12dev #743
Comments
From pierre.raybaut on 2011-09-02T01:38:04Z The more I think about it (and the more I spend time on it), the more I doubt that there will ever be a decent support of IPython >=v0.11 in Spyder's console. That's why I have fixed the PyQt input hook issue on Windows platforms: now the standard Python interpreter may be used even on Windows to do interactive plotting. Plus, I've introduced some basic special commands in the standard Python interpreter: https://code.google.com/p/spyderlib/source/detail?r=07394d8b179087e8be2f6a629e096ed3c4c4c14e And fixed a bug with PYTHONSTARTUP substitution: https://code.google.com/p/spyderlib/source/detail?r=2d7929020f3e7756dfc4456d5653fda66759c3c9 These two changesets were intended to facilitate the use of standard Python interpreter as an interactive computing shell. I've created two PYTHONSTARTUP scripts (on my machine) which are basically: #guiqwt-interactive and: #matplotlib-interactive With these startup scripts, I have my own IPython (not as powerful as IPython, of course). |
From pierre.raybaut on 2011-09-04T06:07:54Z Status: Duplicate |
From DavidAnt...@gmail.com on 2011-09-06T16:10:23Z I'm a bit puzzled by what the problem is here. I'm running ipython 0.12dev (thanks to Pierre's suggestion of putting it's source in my PYTHONPATH). If I type in the following into an IPython shell: import matplotlib.pyplot as plt I get a popup figure as expected, although it does block the terminal. I'm running the latest hg version of spyder on ubuntu 10.04. |
From ccordoba12 on 2011-09-06T18:11:56Z You're right David, but that's one of the selling points of Ipython: not to block the console, so you can do plots and continue exploring your namespace. But even worst is that my first example don't show anything. |
From DavidAnt...@gmail.com on 2011-09-06T23:21:02Z Pierre, are you able to elaborate on the major show-stoppers for integrating Ipython >= 0.11 into the console? I presume it has something to do with Ipython's zeromq based parallelism not cooperating well with spyder's Qt-based threads. |
From pierre.raybaut on 2011-09-07T02:08:14Z Actually it's more likely related to the new "input hooks" machinery. These are based on PyOS_InputHook - which is a good thing when using IPython from a terminal, but this is not working when running IPython from a subprocess like within Spyder's console (I did not have the opportunity to do some tests on Linux though). The problem may be coming from Python itself because I'm unable to install a PyOS_InputHook function even when I'm using the InteractiveConsole (from the builtin module 'console'). Here is my test script: from spyderlib.widgets.externalshell.inputhook import manager To check if the input hook has been installed, just add I'm convinced that if we make it work with the test script above, it will work with IPython because IPython is no more than an improved 'InteractiveConsole'. It works the same way. |
From ccordoba12 on 2011-09-09T08:15:24Z Pierre, after your latest change (i.e. rev 7070db5139a2) I saw you removed externalshell/inputhook.py. How can we test this now? A few more comments:
|
From pierre.raybaut on 2011-09-09T10:27:30Z Carlos,
The goal of this "simple" integration within Spyder's console was to continue using it without changing anything (or with little changes). But we must keep in mind that the fact that IPython v0.10 was working within Spyder's console was almost a miracle according to the IPython dev team... so it's not so surprising that we have serious problems integrating v0.11 the same way. |
From ccordoba12 on 2011-09-10T10:40:43Z Pierre,
But of course this will break the idea of "simple" integration because then all monitor code will have to be rewritten. I noticed this yesterday when I embedded the two-process terminal I talked you about in Spyder. I can confirm that plotting is working fine with it, but all the rest is broken :) By the way, your superb (and I didn't know miraculous) IPython integration in Spyder is what moved me to use it and then to contribute to it. It was the best IPython GUI integration until 0.11. |
From pierre.raybaut on 2011-09-11T02:29:36Z (Maybe we should have opened a discussion on Spyder's Google Group after all...!) Carlos,
3.: Actually, I didn't try the code you were referring to but if this is a zmq two-process terminal, then we will be confronted to the same issues as the IPython plugin (note that it already supports the Variable explorer). Regarding the IPython v0.10 integration, this was one of the most spectacular new feature of Spyder v2.0. Spyder v1 interactive console was running in the same process, same thread as Spyder's main window, an unsafe architecture. IPython integration was, at that time, the only way to provide interactivity (non-blocking GUI support in console) with a safer architecture. Now, the standard Python can provide such interactivity and safety ( http://spyder-ide.blogspot.com/2011/09/new-enhanced-scientific-python.html ). |
From ccordoba12 on 2011-08-30T21:31:57Z
If you enter something like:
In [1]: %pylab
Welcome to pylab, a matplotlib-based Python environment [backend: Qt4Agg].
For more information, type 'help(pylab)'.
In [2]: plot(range(100))
Out[2]: [<matplotlib.lines.Line2D at 0x2d85150>]
there isn't any window opened. This is true for Mac and Linux and with all the matplotlib backends available.
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=743
The text was updated successfully, but these errors were encountered: