[IPython-dev] IPythonQt development update

David Mashburn david.n.mashburn@gmail....
Thu Jun 24 13:27:00 CDT 2010


Hello Gerardo,

With PySlices (part of wxPython now), I went for the easy route and put 
all the outputs together in one cell.  The advantages either way as I 
see them:

One output cell: Easy for the user to delete the entire output quickly.

Multiple cells: Easy for the user to delete chunks of the output that 
are unnecessarily large.

One thing I could see as very useful if you are going to have multiple 
output cells would be to let the user either collapse or delete all the 
output from any single input (that is one of the few gripes I've had 
with the way Mathematica works, for example).

Just my 2 cents!

-David

Fernando Perez wrote:
> Hi Gerardo,
>
> On Wed, Jun 23, 2010 at 1:28 AM, Gerardo Gutierrez
> <muzgash.lists@gmail.com> wrote:
>   
>> So, something (not working as planned) is in
>> git@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
>     self.console.runcode(src)
>   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
>     self.handle_reply(rep)
>   File "/home/fperez/ipython/ipython/IPython/gui/qt/frontend.py", line
> 102, in handle_reply
>     self.recv_output()
>   File "/home/fperez/ipython/ipython/IPython/gui/qt/frontend.py", line
> 98, in recv_output
>     self.handle_output(omsg)
>   File "/home/fperez/ipython/ipython/IPython/gui/qt/ipqt_frontend.py",
> line 88, in handle_output
>     handler(omsg)
>   File "/home/fperez/ipython/ipython/IPython/gui/qt/ipqt_frontend.py",
> line 69, in handle_pyerr
>     pyerr_msg=omsg.content.etype+':'+omsg.content.evaule+'\n
> '+omsg.content.traceback
> 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.
>
> Cheers,
>
> f
> _______________________________________________
> IPython-dev mailing list
> IPython-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>   



More information about the IPython-dev mailing list