[IPython-dev] IPythonQt development update

Fernando Perez fperez.net at gmail.com
Wed Jun 23 22:20:43 EDT 2010

Hi Gerardo,

On Wed, Jun 23, 2010 at 1:28 AM, Gerardo Gutierrez
<muzgash.lists at gmail.com> wrote:
> So, something (not working as planned) is in
> git at github.com:muzgash/ipython.git
> You have to install pyzmq and I think that with python-qt4-dev and
> pyqt4-dev-tools also will be enough.
> The frontend have pure graphical features working well (until someone finds
> a bug :p ) however, I have some problems trying to run several lines, I
> think I don't understand well this piece of code from the frontend.py file
> from the pyzmq examples

I've cleaned that code up a little bit and fixed the multiline
problem.  I just pushed to your master branch, so do

git pull

before continuing and multiline input should be working.

Some notes on your current prototype:

- when hitting Ctrl-Return, a new cell should be automatically created
below and the cursor moved to the new cell.

- there should be a way to move the cursor between cells

- pyout isn't being captured now, don't worry about it.  Fixing
multiline input handling in the simple way I did it disables
sys.displayhook.  This is a slightly thorny problem and I don't have a
solution yet, I'll post more details later to get some ideas from
others though.  For now, it's better to have multiline input than
expression output (since print always works).  We'll find a suitable
solution later.

- Your handling of exceptions is broken:

Traceback (most recent call last):
  File "./ipythonqt.py", line 60, in execute
  File "/home/fperez/ipython/ipython/IPython/gui/qt/ipqt_frontend.py",
line 98, in runcode
    rep = self.recv_reply()
  File "/home/fperez/ipython/ipython/IPython/gui/qt/frontend.py", line
118, in recv_reply
  File "/home/fperez/ipython/ipython/IPython/gui/qt/frontend.py", line
102, in handle_reply
  File "/home/fperez/ipython/ipython/IPython/gui/qt/frontend.py", line
98, in recv_output
  File "/home/fperez/ipython/ipython/IPython/gui/qt/ipqt_frontend.py",
line 88, in handle_output
  File "/home/fperez/ipython/ipython/IPython/gui/qt/ipqt_frontend.py",
line 69, in handle_pyerr
AttributeError: 'Message' object has no attribute 'evaule'

> One thing I want to discuss, or at least read some opinions is what to do
> with different outputs from inputs from the same cell, I mean:
> ________
> | a=0      |
> | a          |
> | a+10    |
> Suppose this is the input cell, so there will be two ouputs, the question is
> then, does this outputs need to be in the same cell or in different ones?

We'll first have to figure out how to get cleanly multi-line input
*and* expression output.  But once that's fixed, I think the outputs
should end up in different output cells, so that one output cell
contains one result each (for use with _NN variables, for example).

> There's a new file pushed today (ipqt_popups.py) which will contain every
> extra widget, until today it hast the stdin linedit to handle request from
> raw_input (which I don't really know how to do that) and the foreign stream
> to handle ouputs and inputs from other clients.
> There're also some graphical features still to implement such as the
> debugging, magic toolbar and function and tab popups. And another one very
> important, every output cell has to be related to the input cell it came so
> if the input cell is edited, the new output overwrites the old one in the
> same cell or if there's no output,the cell is erased. I don't really know a
> good way to achieve this, I think that with a relating attribute will be
> good enough.
> Thanks in advance for your help and comments.

Have a go at fixing the problems above and the code cleanups we
discussed over skype, and post more frequently on the list so we can
give you timely feedback.



More information about the IPython-dev mailing list